From c78438075cc3121ed7cafb4444e571703626c1fd Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 11 Oct 2024 17:06:06 +0800 Subject: [PATCH] bugfix --- bricks/rtc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bricks/rtc.js b/bricks/rtc.js index ae0c22c..1a09afd 100644 --- a/bricks/rtc.js +++ b/bricks/rtc.js @@ -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'); }