Skip to content

Commit

Permalink
request macos mic permission
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherTrimboli committed Dec 11, 2023
1 parent 03e14f3 commit b48a390
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lala-companion",
"productName": "lala-companion",
"version": "0.0.6",
"version": "0.0.7",
"description": "3D personified desktop assistants, tuned for you, powered by AI vision and voice.",
"main": ".vite/build/main.js",
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { app, BrowserWindow, ipcMain, screen } from "electron";
import {
app,
BrowserWindow,
ipcMain,
screen,
systemPreferences,
} from "electron";
import path from "path";

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

if (process.platform === "darwin") {
systemPreferences.askForMediaAccess("microphone");
}

ipcMain.on("open-overlay", (event, title) => {
createOverlayWindow(false);
});
Expand Down

0 comments on commit b48a390

Please sign in to comment.