From 81dbde0937b6949c3b9355905f7a103fab3ceb5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 27 Feb 2025 14:08:47 +0100 Subject: [PATCH] fix(macOS) fix missing thumbnails when enumerating SS sources --- main.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index c93bd88e2..0b917425e 100644 --- a/main.js +++ b/main.js @@ -35,9 +35,15 @@ const ENABLE_REMOTE_CONTROL = false; // We need this because of https://github.com/electron/electron/issues/18214 app.commandLine.appendSwitch('disable-site-isolation-trials'); -// This allows BrowserWindow.setContentProtection(true) to work on macOS. -// https://github.com/electron/electron/issues/19880 -app.commandLine.appendSwitch('disable-features', 'DesktopCaptureMacV2,IOSurfaceCapturer'); +// Fix screen-sharing thumbnails being missing sometimes. +// https://github.com/electron/electron/issues/44504 +const disabledFeatures = [ + 'ThumbnailCapturerMac:capture_mode/sc_screenshot_manager', + 'ScreenCaptureKitPickerScreen', + 'ScreenCaptureKitStreamPickerSonoma' +]; + +app.commandLine.appendSwitch('disable-features', disabledFeatures.join(',')); // Enable Opus RED field trial. app.commandLine.appendSwitch('force-fieldtrials', 'WebRTC-Audio-Red-For-Opus/Enabled/');