@@ -188,7 +188,7 @@ class Party extends Component {
<divid={/* The video container needs a special id */`${this.webrtc.getContainerId(p)}`}>
<video
// Important: The video element needs both an id and ref
id={this.webrtc.getId(p)}
id={this.webrtc.getDomId(p)}
ref={(v)=>this.remoteVideos[p.id]=v}
/>
</div>
...
...
@@ -368,7 +368,7 @@ room via the signaling server (similar to `shout`, but not p2p). Listen for peer
`getMyId()` - get your own peer ID
`getId(peer)` - get the DOM id associated with a peer's media stream. In JSX, you will need to set the id of the peer's media element to this value.
`getDomId(peer)` - get the DOM id associated with a peer's media stream. In JSX, you will need to set the id of the peer's media element to this value.
-`Peer peer` - the object representing the peer and its peer connection
`getPeerById(id)` - returns a peer with a given `id`
@@ -370,7 +374,7 @@ class LioWebRTC extends WildEmitter {
}
getContainerId(peer){
return`container_${this.getId(peer)}`;
return`container_${this.getDomId(peer)}`;
}
// set volume on video tag for all peers takse a value between 0 and 1
...
...
@@ -408,7 +412,7 @@ class LioWebRTC extends WildEmitter {
for (typeinclient){
if (client[type]){
constpeerCount=this.webrtc.getPeers().length;
if (this.config.dataOnly&&this.config.network.maxPeers>0&&(peerCount>=this.config.network.minPeers||peerCount>=this.config.network.maxPeers)){
if (this.config.dataOnly&&this.config.constraints.maxPeers>0&&(peerCount>=this.config.constraints.minPeers||peerCount>=this.config.constraints.maxPeers)){
break;
}
peer=self.webrtc.createPeer({
...
...
@@ -420,7 +424,12 @@ class LioWebRTC extends WildEmitter {