mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-10-26 02:48:47 -04: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
|
||||
|
|
|
|||
|
|
@ -36,7 +36,11 @@
|
|||
"mac": {
|
||||
"target": "dmg",
|
||||
"identity": null,
|
||||
"artifactName": "ReticulumWebChat-v${version}-${os}.${ext}"
|
||||
"artifactName": "ReticulumWebChat-v${version}-${os}.${ext}",
|
||||
"extendInfo": {
|
||||
"NSMicrophoneUsageDescription": "Microphone access is only needed for Audio Calls",
|
||||
"com.apple.security.device.audio-input": true
|
||||
}
|
||||
},
|
||||
"win": {
|
||||
"artifactName": "ReticulumWebChat-v${version}-${os}.${ext}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue