From 9114a6006e2afe27404645f12b3b78220f02fc85 Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty Date: Fri, 27 Oct 2023 16:35:50 -0400 Subject: [PATCH] fix(SS): Reverse the encoding order for Firefox desktop streams. Fixes an issue where screenshare from Firefox appears blurry on other endpoints in the call. --- modules/RTC/TPCUtils.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/RTC/TPCUtils.js b/modules/RTC/TPCUtils.js index 6221d65246..a2dcfe7a79 100644 --- a/modules/RTC/TPCUtils.js +++ b/modules/RTC/TPCUtils.js @@ -89,7 +89,10 @@ export class TPCUtils { // The SSRCs on older versions of Firefox are reversed in SDP, i.e., they have resolution order of 1:2:4 as // opposed to Chromium and other browsers. This has been reverted in Firefox 117 as part of the below commit. // https://hg.mozilla.org/mozilla-central/rev/b0348f1f8d7197fb87158ba74542d28d46133997 - const reversedEncodings = browser.isFirefox() && browser.isVersionLessThan(117); + // This revert seems to be applied only to camera tracks, the desktop stream encodings still have the + // resolution order of 4:2:1. + const reversedEncodings = browser.isFirefox() + && (videoType === VideoType.DESKTOP || browser.isVersionLessThan(117)); return [ {