This commit is contained in:
yumoqing 2024-10-11 17:06:06 +08:00
parent bae54cea49
commit c78438075c

View File

@ -334,12 +334,13 @@ bricks.RTCP2PConnect = class {
console.log('state is connected, data_connect=',
this.opts.data_connect,
'role=', role);
if (this.opts.data_connect && role == 'requester'){
if (role == 'requester'){
var dc = pc.createDataChannel('chat');
await this.dc_created(peer, dc);
if(this.opts.on_pc_connected){
this.opts.on_pc_connected(peer);
}
console.log('dc created', dc);
} else {
console.log('87y333333333333333333333333333333333354');
}