mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-25 15:25:44 +00:00
fix: add setDevicePermissionHandler for Windows 11 webcam access
Chromium (Electron 17+) requires setDevicePermissionHandler in addition to setPermissionCheckHandler/setPermissionRequestHandler. Without it, device-level access is silently denied on Windows 11 even though the permission check passes, causing getUserMedia to throw NotAllowedError.
This commit is contained in:
@@ -627,6 +627,8 @@ app.whenReady().then(async () => {
|
||||
callback(allowed.includes(permission));
|
||||
});
|
||||
|
||||
session.defaultSession.setDevicePermissionHandler((_details) => true);
|
||||
|
||||
if (process.platform === "darwin") {
|
||||
const cameraStatus = systemPreferences.getMediaAccessStatus("camera");
|
||||
if (cameraStatus !== "granted") {
|
||||
|
||||
Reference in New Issue
Block a user