Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
record permissions prompt
Siddharth43b01cfb604d
diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.tsindex f2812d4f9..a7f41016c 100644--- a/electron/ipc/handlers.ts+++ b/electron/ipc/handlers.ts@@ -1396,7 +1396,37 @@ export function registerIpcHandlers(});ipcMain.handle("request-native-mac-cursor-access", async () => {- return requestMacCursorAccessibilityAccess();+ const access = await requestMacCursorAccessibilityAccess();++ // When the editable cursor can't get Accessibility trust, don't leave the+ // user guessing where to enable it — pop a native dialog that deep-links+ // straight to the Accessibility pane (mirrors the Screen Recording flow).+ if (process.platform === "darwin" && !access.granted) {+ const mainWin = getMainWindow();+ const detail =+ access.status === "missing-helper"+ ? "The cursor helper couldn't be found in this build, so the editable cursor can't be enabled. Rebuild the native helper (npm run build:native:mac) or switch the HUD cursor mode to system."+ : "Allow OpenScreen under System Settings → Privacy & Security → Accessibility, then press record again to start the countdown.";+ const messageOptions = {+ type: "warning",+ buttons: ["Open Accessibility Settings", "Cancel"],+ defaultId: 0,+ cancelId: 1,+ message: "Accessibility access is required for the editable cursor",+ detail,+ } satisfies Electron.MessageBoxOptions;+ const result =+ mainWin && !mainWin.isDestroyed()+ ? await dialog.showMessageBox(mainWin, messageOptions)+ : await dialog.showMessageBox(messageOptions);+ if (result.response === 0) {+ await shell.openExternal(+ "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility",+ );+ }+ }++ return access;});ipcMain.handle("open-source-selector", async () => {diff --git a/src/hooks/useScreenRecorder.ts b/src/hooks/useScreenRecorder.tsindex f5fb92032..e0db20ed9 100644--- a/src/hooks/useScreenRecorder.ts+++ b/src/hooks/useScreenRecorder.ts@@ -1069,9 +1069,11 @@ export function useScreenRecorder(): UseScreenRecorderReturn {try {const platform = await window.electronAPI.getPlatform();if (platform === "darwin" && cursorCaptureMode === "editable-overlay") {+ // The main process shows a native dialog that deep-links to the+ // Accessibility settings pane when access is missing, so we just stop+ // here and let the user grant it and press record again.const access = await window.electronAPI.requestNativeMacCursorAccess();if (!access.granted) {- toast.info(t("recording.accessibilityAllowAndRetry"));return;}}