This commit is contained in:
yumoqing 2024-08-22 14:38:18 +08:00
parent 213598d83b
commit dc3b05e33d

View File

@ -316,8 +316,13 @@ bricks.RTCClient = class extends bricks.VBox {
console.log('createPeerConnection() finished');
}
ice_statechange(event){
async ice_statechange(event){
console.log(`oniceconnectionstatechange, pc.iceConnectionState is ${this.pc.iceConnectionState}.`)
if (this.pc.iceConnectionState == 'disconnected'){
if (this.role == 'requester'){
send_offer();
}
}
}
ice_g_statechange(event){
console.log(`onicegatheringstatechange, pc.iceGatheringState is ${this.pc.iceGatheringState}.`);