adding stuff for mic

This commit is contained in:
talksik
2022-05-29 08:46:58 -05:00
parent c3eba13154
commit 4f7d8c92c1
6 changed files with 142 additions and 104 deletions
+5 -1
View File
@@ -1,4 +1,4 @@
import { app, BrowserWindow, ipcMain, Display, screen } from 'electron';
import { app, BrowserWindow, ipcMain, Display, screen, systemPreferences } from 'electron';
import Channels, { DEFAULT_APP_PRESET, DimensionChangeRequest } from './electron/constants';
import { handleGoogleLogin } from './electron/handleLogin';
@@ -64,6 +64,10 @@ app
console.log('initiating log in');
await handleGoogleLogin();
});
ipcMain.on(Channels.ASK_MICROPHONE_PERMISSIONS, async () => {
systemPreferences.askForMediaAccess('microphone');
});
})
.then(() => {
// dynamically changing the window bounds