Created
June 14, 2020 12:23
-
-
Save shriyaRam/b5bfe3282877855ab33cf10c6119b669 to your computer and use it in GitHub Desktop.
This file contains 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
function logger() | |
{ | |
//initialize client | |
const client = AgoraRTM.createInstance(appid.value); | |
//check connection state | |
client.on('ConnectionStateChange', (newState, reason) => { | |
console.log('on connection state changed to ' + newState + ' reason: ' + reason); | |
}); | |
//login-mandatory | |
client.login({ token: null, uid: myuid.value }).then(() => { | |
console.log('AgoraRTM client login success'); | |
}).catch(err => { | |
console.log('AgoraRTM client login failure', err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment