mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-04-27 16:10:32 +00:00
ask for microphone access so audio calls work on standalone macos app
This commit is contained in:
parent
fd89b50da5
commit
97c89cf97c
2 changed files with 9 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
const { app, BrowserWindow, ipcMain } = require('electron');
|
||||
const { app, BrowserWindow, ipcMain, systemPreferences } = require('electron');
|
||||
const electronPrompt = require('electron-prompt');
|
||||
const { spawn } = require('child_process');
|
||||
const fs = require('fs');
|
||||
|
|
@ -66,6 +66,9 @@ app.whenReady().then(async () => {
|
|||
exe = path.join(__dirname, '..', 'build/exe/ReticulumWebChat');
|
||||
}
|
||||
|
||||
// ask user for microphone access for audio calls to work
|
||||
await systemPreferences.askForMediaAccess('microphone');
|
||||
|
||||
try {
|
||||
|
||||
// spawn executable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue