Created
June 14, 2020 14:08
-
-
Save shriyaRam/ff2f86e5068503f0992327492c22fa64 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
// The client joins the channel | |
client.join(null,"test",null, (uid)=>{ | |
// Stream object associated with your web cam is initialized | |
let localStream = AgoraRTC.createStream({ | |
streamID: uid, | |
audio: true, | |
video: true, | |
screen: false | |
}); | |
globalstream = localStream; | |
// Associates the stream to the client | |
localStream.init(function() { | |
//Plays the localVideo | |
localStream.play('me'); | |
//Publishes the stream to the channel | |
client.publish(localStream, handleFail); | |
},handleFail); | |
},handleFail); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment