Skip to content

Instantly share code, notes, and snippets.

@shriyaRam
Created June 14, 2020 14:08
Show Gist options
  • Save shriyaRam/ff2f86e5068503f0992327492c22fa64 to your computer and use it in GitHub Desktop.
Save shriyaRam/ff2f86e5068503f0992327492c22fa64 to your computer and use it in GitHub Desktop.
// 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