From e4a266ae75ae9f55c8bcf5783a401ca9748bcaa4 Mon Sep 17 00:00:00 2001 From: prlanzarin <4529051+prlanzarin@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:44:29 -0300 Subject: [PATCH] fix(audio): broken connection stats on Firefox >= 125 WebRTC-based stats generation in the connection status modal is broken on Firefox >= 125. A broken type check coupled with a new partially implemented RTCIceTransport dictionary causes and undefined function call when fetching the selected candidate pair. Since that error is unhandled, collection breaks. Correctly check for the getSelectedCandidatePair method availability in RTCIceTransport so that it skips to pair inference from getStats if necessary. --- .../imports/ui/services/audio-manager/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/services/audio-manager/index.js b/bigbluebutton-html5/imports/ui/services/audio-manager/index.js index e5084cb8cc..c347755b55 100755 --- a/bigbluebutton-html5/imports/ui/services/audio-manager/index.js +++ b/bigbluebutton-html5/imports/ui/services/audio-manager/index.js @@ -1054,10 +1054,9 @@ class AudioManager { receivers[0] && receivers[0].transport && receivers[0].transport.iceTransport && - receivers[0].transport.iceTransport + typeof receivers[0].transport.iceTransport.getSelectedCandidatePair === 'function' ) { - selectedPair = - receivers[0].transport.iceTransport.getSelectedCandidatePair(); + selectedPair = receivers[0].transport.iceTransport.getSelectedCandidatePair(); } return selectedPair;