bugfix
This commit is contained in:
parent
595e2c126f
commit
1aae99c212
@ -344,6 +344,10 @@ bricks.RTCP2PConnect = class {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async dc_accepted(peer, event){
|
||||||
|
dc = event.channel;
|
||||||
|
await this.dc_created(peer, event);
|
||||||
|
}
|
||||||
async dc_created(peer, dc){
|
async dc_created(peer, dc){
|
||||||
console.log('dc_created.....');
|
console.log('dc_created.....');
|
||||||
this.peers[peer.id].dc = dc;
|
this.peers[peer.id].dc = dc;
|
||||||
@ -393,10 +397,7 @@ bricks.RTCP2PConnect = class {
|
|||||||
pc.onicecandidate = this.send_candidate.bind(this, peer);
|
pc.onicecandidate = this.send_candidate.bind(this, peer);
|
||||||
pc.oniceconnectionstatechange = this.ice_statechange.bind(this, peer);
|
pc.oniceconnectionstatechange = this.ice_statechange.bind(this, peer);
|
||||||
pc.onconnectionstatechange = this.connection_statechange.bind(this, peer);
|
pc.onconnectionstatechange = this.connection_statechange.bind(this, peer);
|
||||||
pc.ondatachanel = event => {
|
pc.ondatachanel = this.dc_accepted.bind(this, peer);
|
||||||
var dc = event.channel;
|
|
||||||
await this.dc_created(peer, dc);
|
|
||||||
}
|
|
||||||
pc.ontrack = event => {
|
pc.ontrack = event => {
|
||||||
remoteVideo.set_stream(event.streams[0]);
|
remoteVideo.set_stream(event.streams[0]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user