From 3d3944b227385e0d84cbe53d3f44ea6aeff50275 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 15 Sep 2022 08:31:40 -0700 Subject: [PATCH] webrtc: improve startup on renegotiated bundle connections --- plugins/webrtc/src/ffmpeg-to-wrtc.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/webrtc/src/ffmpeg-to-wrtc.ts b/plugins/webrtc/src/ffmpeg-to-wrtc.ts index 0bb8c9ec2..5ec124b2f 100644 --- a/plugins/webrtc/src/ffmpeg-to-wrtc.ts +++ b/plugins/webrtc/src/ffmpeg-to-wrtc.ts @@ -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');