ask for microphone access so audio calls work on standalone macos app
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
const { app, BrowserWindow, ipcMain } = require('electron');
|
const { app, BrowserWindow, ipcMain, systemPreferences } = require('electron');
|
||||||
const electronPrompt = require('electron-prompt');
|
const electronPrompt = require('electron-prompt');
|
||||||
const { spawn } = require('child_process');
|
const { spawn } = require('child_process');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
@@ -66,6 +66,9 @@ app.whenReady().then(async () => {
|
|||||||
exe = path.join(__dirname, '..', 'build/exe/ReticulumWebChat');
|
exe = path.join(__dirname, '..', 'build/exe/ReticulumWebChat');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ask user for microphone access for audio calls to work
|
||||||
|
await systemPreferences.askForMediaAccess('microphone');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// spawn executable
|
// spawn executable
|
||||||
|
|||||||
@@ -36,7 +36,11 @@
|
|||||||
"mac": {
|
"mac": {
|
||||||
"target": "dmg",
|
"target": "dmg",
|
||||||
"identity": null,
|
"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": {
|
"win": {
|
||||||
"artifactName": "ReticulumWebChat-v${version}-${os}.${ext}",
|
"artifactName": "ReticulumWebChat-v${version}-${os}.${ext}",
|
||||||
|
|||||||
Reference in New Issue
Block a user