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){
|
||||
console.log('dc_created.....');
|
||||
this.peers[peer.id].dc = dc;
|
||||
@ -393,10 +397,7 @@ bricks.RTCP2PConnect = class {
|
||||
pc.onicecandidate = this.send_candidate.bind(this, peer);
|
||||
pc.oniceconnectionstatechange = this.ice_statechange.bind(this, peer);
|
||||
pc.onconnectionstatechange = this.connection_statechange.bind(this, peer);
|
||||
pc.ondatachanel = event => {
|
||||
var dc = event.channel;
|
||||
await this.dc_created(peer, dc);
|
||||
}
|
||||
pc.ondatachanel = this.dc_accepted.bind(this, peer);
|
||||
pc.ontrack = event => {
|
||||
remoteVideo.set_stream(event.streams[0]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user