From e13d4ba4ee672cd27f55b5b26b6d21e80ce260b4 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 21 Aug 2024 10:29:25 +0800 Subject: [PATCH] bugfix --- bricks/rtc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bricks/rtc.js b/bricks/rtc.js index ccc3201..86a6eff 100644 --- a/bricks/rtc.js +++ b/bricks/rtc.js @@ -100,7 +100,7 @@ bricks.RTCClient = class extends bricks.VBox { console.log('event params=', event.params); bricks.Body.remove_widget(this.menu); if (! this.localVideo.get_stream()){ - await this.getLocalVideo(); + await this.getLocalStream(); } var peer_info = { id:event.params.name, @@ -170,6 +170,9 @@ bricks.RTCClient = class extends bricks.VBox { if (this.peer_info){ this.call_close(); } + if (! this.localVideo.get_stream()){ + await this.getLocalStream(); + } this.peer_info = peer_info this.role = 'responser' await this.createPeerConnection();