Skip to content

Commit d2db64e

Browse files
authored
fix(aot): Hide AOT when SS on Windows (#251)
Fixes: #133
1 parent efdc15b commit d2db64e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
SDK for integrating Jitsi Meet into Electron applications.
44

5-
Supported Electron versions: >= 11.
5+
Supported Electron versions: >= 16.
66

77
## Installation
88

alwaysontop/main/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const electron = require('electron');
22
const os = require('os');
33
const { BrowserWindow, ipcMain } = electron;
44

5+
const { windowsEnableScreenProtection } = require('../../helpers/functions');
56
const { EVENTS, STATES, AOT_WINDOW_NAME } = require('../constants');
67
const {
78
getPosition,
@@ -58,9 +59,7 @@ const openAotWindow = (event, options) => {
5859
// Required to allow the window to be rendered on top of full screen apps
5960
aotWindow.setAlwaysOnTop(true, 'screen-saver');
6061

61-
// Once this bug is fixed on Electron side we'll re-enable this for Windows 10 Version 2004 or newer:
62-
// https://github.com/electron/electron/issues/29085
63-
if (os.platform() !== 'win32') {
62+
if (os.platform() !== 'win32' || windowsEnableScreenProtection(os.release())) {
6463
// Avoid this window from being captured.
6564
aotWindow.setContentProtection(true);
6665
}

0 commit comments

Comments
 (0)