Skip to content

Commit

Permalink
Add ask for media access in MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
llaske committed Apr 6, 2024
1 parent 09b4396 commit 9788c07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ function createWindow () {
};
menu.submenu[0].label = l10n.get("Quit");
template.unshift(menu);

const { systemPreferences } = require('electron')
systemPreferences.askForMediaAccess('microphone');
systemPreferences.askForMediaAccess('camera');
}
var menu = Menu.buildFromTemplate(template);
Menu.setApplicationMenu(menu);
Expand Down

0 comments on commit 9788c07

Please sign in to comment.