Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(electron): add screen and display-capture to Electron permission allowlists

auberginewlyc9b60746268c
diff --git a/electron/main.ts b/electron/main.ts
index 007df33ca..cf20b5a28 100644
--- a/electron/main.ts
+++ b/electron/main.ts
@@ -449,14 +449,30 @@ app.whenReady().then(async () => {
app.dock?.show();
}
- // Allow microphone/media permission checks
+ // Allow microphone/media/screen permission checks
session.defaultSession.setPermissionCheckHandler((_webContents, permission) => {
- const allowed = ["media", "audioCapture", "microphone", "videoCapture", "camera"];
+ const allowed = [
+ "media",
+ "audioCapture",
+ "microphone",
+ "videoCapture",
+ "camera",
+ "screen",
+ "display-capture",
+ ];
return allowed.includes(permission);
});
session.defaultSession.setPermissionRequestHandler((_webContents, permission, callback) => {
- const allowed = ["media", "audioCapture", "microphone", "videoCapture", "camera"];
+ const allowed = [
+ "media",
+ "audioCapture",
+ "microphone",
+ "videoCapture",
+ "camera",
+ "screen",
+ "display-capture",
+ ];
callback(allowed.includes(permission));
});