fix(presenter): Do not resize the desktop track on FF by default.

Resizing of the desktop track on Firefox is not needed anymore since the browser now reports the correct resolution of the desktop track after the fix here - ada0f5e537.
Fixes https://github.com/jitsi/jitsi-meet/issues/8519
This commit is contained in:
Jaya Allamsetty 2021-04-22 13:41:12 -04:00 committed by Jaya Allamsetty
parent f4c8310ea7
commit d96bb83496
1 changed files with 1 additions and 5 deletions

View File

@ -1771,16 +1771,12 @@ export default {
const isPortrait = height >= width; const isPortrait = height >= width;
const DESKTOP_STREAM_CAP = 720; const DESKTOP_STREAM_CAP = 720;
// Config.js setting for resizing high resolution desktop tracks to 720p when presenter is turned on.
const resizeEnabled = config.videoQuality && config.videoQuality.resizeDesktopForPresenter;
const highResolutionTrack const highResolutionTrack
= (isPortrait && width > DESKTOP_STREAM_CAP) || (!isPortrait && height > DESKTOP_STREAM_CAP); = (isPortrait && width > DESKTOP_STREAM_CAP) || (!isPortrait && height > DESKTOP_STREAM_CAP);
// Resizing the desktop track for presenter is causing blurriness of the desktop share on chrome. // Resizing the desktop track for presenter is causing blurriness of the desktop share on chrome.
// Disable resizing by default, enable it only when config.js setting is enabled. // Disable resizing by default, enable it only when config.js setting is enabled.
// Firefox doesn't return width and height for desktop tracks. Therefore, track needs to be resized const resizeDesktopStream = highResolutionTrack && config.videoQuality?.resizeDesktopForPresenter;
// for creating the canvas for presenter.
const resizeDesktopStream = browser.isFirefox() || (highResolutionTrack && resizeEnabled);
if (resizeDesktopStream) { if (resizeDesktopStream) {
let desktopResizeConstraints = {}; let desktopResizeConstraints = {};