This commit is contained in:
yumoqing 2024-10-11 16:33:56 +08:00
parent 74899d23c0
commit 36d71eef6a

View File

@ -336,9 +336,14 @@ bricks.RTCP2PConnect = class {
return;
}
if (pc.connectionState == 'connected'){
console.log('state is connected, data_connect=',
this.opts.data_connect,
'role=', role);
if (this.opts.data_connect && role == 'requester'){
var dc = pc.createDataChannel();
var dc = pc.createDataChannel('chat');
await this.dc_created(peer, dc);
} else {
console.log('87y333333333333333333333333333333333354');
}
}
}