Created
October 8, 2020 19:50
-
-
Save digitallysavvy/bfe60a6cbb5372ee55fe33401c2be634 to your computer and use it in GitHub Desktop.
A snippet for extracting the value from modal inputs and passing them to functions to initialize the Agora and PubNub clients.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// init the session when user clicks join | |
$( "#join-channel" ).click(function( event ) { | |
var agoraAppId = $('#form-appid').val(); | |
var token = $('#form-token').val(); | |
var channelName = $('#form-channel').val(); | |
var pubKey = $('#form-publishKey').val(); | |
var subKey = $('#form-subscribeKey').val(); | |
var uid = $("#form-uid").val(); | |
$("#modalForm").modal("hide"); | |
initClientAndJoinChannel(agoraAppId, token, channelName, uid); | |
initPubNub(pubKey, subKey, uid, channelName); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment