This commit is contained in:
yumoqing 2024-08-23 11:35:22 +08:00
parent a03fd9bb8e
commit 3af4d43157

View File

@ -322,9 +322,7 @@ bricks.RTCClient = class extends bricks.VBox {
this.remoteVideo.set_stream(event.streams[0]);
};
if (this.role == 'requester'){
await this.send_offer();
}
console.log('createPeerConnection() finished');
}
@ -332,7 +330,7 @@ bricks.RTCClient = class extends bricks.VBox {
console.log(`oniceconnectionstatechange, pc.iceConnectionState is ${this.pc.iceConnectionState}.`);
if (this.pc.iceConnectionState === 'disconnected'){
if (this.role == 'requester'){
await send_offer();
await this.send_offer();
}
}
}