This commit is contained in:
yumoqing 2024-10-12 11:55:00 +08:00
parent 33ef5372e7
commit 43c0098c70

View File

@ -375,7 +375,7 @@ bricks.RTCP2PConnect = class {
await this.opts.on_dc_close(dc); await this.opts.on_dc_close(dc);
} }
} }
createDataChannel(peer){ async createDataChannel(peer){
this.peers[peer.id].dc = pc.createDataChannel('chat', {ordered:true}); this.peers[peer.id].dc = pc.createDataChannel('chat', {ordered:true});
var dc = this.peers[peer.id].dc; var dc = this.peers[peer.id].dc;
await this.dc_created(peer, this.peers[peer.id].dc); await this.dc_created(peer, this.peers[peer.id].dc);