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
fix: isolate macOS native capture by platform
Etienne Lescot179047b834ef
diff --git a/electron-builder.json5 b/electron-builder.json5index dc6687d97..8ad4a80eb 100644--- a/electron-builder.json5+++ b/electron-builder.json5@@ -46,6 +46,13 @@],"icon": "icons/icons/mac/icon.icns","artifactName": "${productName}-Mac-${arch}-${version}-Installer.${ext}",+ "extraResources": [+ {+ "from": "electron/native/bin",+ "to": "electron/native/bin",+ "filter": ["darwin-*/*"]+ }+ ],"extendInfo": {"NSAudioCaptureUsageDescription": "OpenScreen needs audio capture permission to record system audio.","NSMicrophoneUsageDescription": "OpenScreen needs microphone access to record voice audio.",@@ -73,7 +80,7 @@{"from": "electron/native/bin","to": "electron/native/bin",- "filter": ["**/*"]+ "filter": ["win32-*/*"]}]},diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.tsindex 1a5ba0b88..b12a08aab 100644--- a/electron/ipc/handlers.ts+++ b/electron/ipc/handlers.ts@@ -1759,6 +1759,10 @@ export function registerIpcHandlers(});ipcMain.handle("pause-native-mac-recording", async () => {+ if (process.platform !== "darwin") {+ return { success: false, error: "Native macOS capture requires macOS." };+ }+const proc = nativeMacCaptureProcess;if (!proc) {return { success: false, error: "Native macOS capture is not running." };@@ -1781,6 +1785,10 @@ export function registerIpcHandlers(});ipcMain.handle("resume-native-mac-recording", async () => {+ if (process.platform !== "darwin") {+ return { success: false, error: "Native macOS capture requires macOS." };+ }+const proc = nativeMacCaptureProcess;if (!proc) {return { success: false, error: "Native macOS capture is not running." };@@ -1887,6 +1895,10 @@ export function registerIpcHandlers(});ipcMain.handle("stop-native-mac-recording", async (_, discard?: boolean) => {+ if (process.platform !== "darwin") {+ return { success: false, error: "Native macOS capture requires macOS." };+ }+const proc = nativeMacCaptureProcess;const preferredPath = nativeMacCaptureTargetPath;const recordingId = nativeMacCaptureRecordingId ?? Date.now();@@ -1971,6 +1983,10 @@ export function registerIpcHandlers("attach-native-mac-webcam-recording",async (_, payload: AttachNativeMacWebcamRecordingInput) => {try {+ if (process.platform !== "darwin") {+ return { success: false, error: "Native macOS webcam attachment requires macOS." };+ }+const screenVideoPath = normalizeVideoSourcePath(payload.screenVideoPath);if (!screenVideoPath || !isPathWithinDir(screenVideoPath, RECORDINGS_DIR)) {return {