Commit 7308e766 authored by lazorfuzz's avatar lazorfuzz
Browse files

Add doc for joinedRoom event

parent efec0768
......@@ -312,6 +312,8 @@ this.webrtc.on('receivedPeerData', (type, payload, peer) => {
- joining a room with existing peers, once for each peer
- a new peer joins your room
`'joinedRoom', roomName` - emitted after successfully joining a room.
`'leftRoom', roomName` - emitted after successfully leaving the current room,
ending all peers, and stopping local stream
......
......@@ -82,7 +82,7 @@ class LioWebRTC extends WildEmitter {
sharemyscreen: message.roomType === 'screen' && !message.broadcaster,
broadcaster: message.roomType === 'screen' && !message.broadcaster ? self.connection.getSessionid() : null,
});
if (this.config.dataOnly || this.config.constraints.maxPeers > 0) {
if (this.config.dataOnly && this.config.constraints.maxPeers > 0) {
this.sendPing(peer, peer.id, true);
} else {
peer.start();
......@@ -425,7 +425,7 @@ class LioWebRTC extends WildEmitter {
offerToReceiveVideo: !this.config.dataOnly && self.config.receiveMedia.offerToReceiveVideo ? 1 : 0,
},
});
if (this.config.dataOnly || this.config.constraints.maxPeers > 0) {
if (this.config.dataOnly && this.config.constraints.maxPeers > 0) {
this.sendPing(peer, peer.id, true);
} else {
peer.start();
......@@ -503,7 +503,7 @@ class LioWebRTC extends WildEmitter {
offerToReceiveVideo: !this.config.dataOnly && this.config.receiveMedia.offerToReceiveVideo ? 1 : 0,
},
});
if (this.config.dataOnly || this.config.constraints.maxPeers > 0) {
if (this.config.dataOnly && this.config.constraints.maxPeers > 0) {
this.sendPing(peer, peerId, true);
} else {
peer.start();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment