The local stream with audio and video needs to be initiated and published into the Room for other participants to see and hear you. Enx.publish() method is used to publish a local stream to the connected Room. After the local stream is published to the Room, all participants are notified with an callback named streamAdded.
Method: Enx.publish()
Callbacks:
streamPublished– To the publisher that the stream has been publishedeventError– To the publisher to notify that publishing has failedstreamAdded– To all participants announcing new stream in room
roomConnected:event=>{
Enx.publish(); // Publish Stream
}
streamPublished:event=>{
// To publisher - Stream has been published
}
eventError : event=>{
// To publisher - Failed to publish
}
streamAdded:event=>{
// To others - New stream is added
}
