This commit is contained in:
yumoqing 2024-08-21 10:29:25 +08:00
parent f71071de9b
commit e13d4ba4ee

View File

@ -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();