diff options
author | Saúl Ibarra Corretgé <s@saghul.net> | 2021-03-05 16:27:28 +0100 |
---|---|---|
committer | Saúl Ibarra Corretgé <s@saghul.net> | 2021-03-05 23:13:17 +0100 |
commit | da42179d3b7048c69b2b165527a08a9fa7e3828c (patch) | |
tree | f773c16ca9f29dcf62c2148949b8c0d42f5fa070 /main.js | |
parent | bad37a6d5e4c655dac26c63c0be7e04e45e76c8b (diff) |
Prevent AoT and SS-tracker windows from being captured
In electron utils 2.0.15 we mark them as protected content, but on macOS
WebRTC uses a low level API which sidesteps that. An extra command line
argument is passed to fix that.
See: https://github.com/electron/electron/issues/19880
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -29,6 +29,10 @@ const showDevTools = Boolean(process.env.SHOW_DEV_TOOLS) || (process.argv.indexO // 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', 'IOSurfaceCapturer'); + // Needed until robot.js is fixed: https://github.com/octalmage/robotjs/issues/580 app.allowRendererProcessReuse = false; |