webrtc: improve startup on renegotiated bundle connections

This commit is contained in:
Koushik Dutta
2022-09-15 08:31:40 -07:00
parent 85a092b1fa
commit 3d3944b227

View File

@@ -401,7 +401,10 @@ export class WebRTCConnectionManagement implements RTCConnectionManagement {
this.negotiation.then(async () => {
this.console.log('waiting ice connected');
await waitIceConnected(this.pc);
if (this.pc.remoteIsBundled)
await waitConnected(this.pc);
else
await waitIceConnected(this.pc);
if (ret.removed.finished)
return;
this.console.log('done waiting ice connected');