Skip to content

Commit b48a390

Browse files
request macos mic permission
1 parent 03e14f3 commit b48a390

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "lala-companion",
33
"productName": "lala-companion",
4-
"version": "0.0.6",
4+
"version": "0.0.7",
55
"description": "3D personified desktop assistants, tuned for you, powered by AI vision and voice.",
66
"main": ".vite/build/main.js",
77
"scripts": {

src/main.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { app, BrowserWindow, ipcMain, screen } from "electron";
1+
import {
2+
app,
3+
BrowserWindow,
4+
ipcMain,
5+
screen,
6+
systemPreferences,
7+
} from "electron";
28
import path from "path";
39

410
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
@@ -59,6 +65,10 @@ const createOverlayWindow = (withFrame: boolean) => {
5965
app.on("ready", () => {
6066
createMainWindow();
6167

68+
if (process.platform === "darwin") {
69+
systemPreferences.askForMediaAccess("microphone");
70+
}
71+
6272
ipcMain.on("open-overlay", (event, title) => {
6373
createOverlayWindow(false);
6474
});

0 commit comments

Comments
 (0)