This commit is contained in:
yumoqing 2024-10-12 11:57:27 +08:00
parent 43c0098c70
commit 9df2c75cd0

View File

@ -376,6 +376,7 @@ bricks.RTCP2PConnect = class {
} }
} }
async createDataChannel(peer){ async createDataChannel(peer){
var pc = this.peers[peer.id].pc;
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);