Skip to content

Commit

Permalink
fix(macOS) fix missing thumbnails when enumerating SS sources
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Feb 27, 2025
1 parent 27e3224 commit 81dbde0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/');
Expand Down

0 comments on commit 81dbde0

Please sign in to comment.