fix: restore setDisplayMediaRequestHandler with useSystemPicker
Electron requires setDisplayMediaRequestHandler for getDisplayMedia() to work — removing it broke screen sharing entirely. Restored the handler with useSystemPicker: true, which on macOS 15+ uses the native system picker (honoring restrictOwnAudio), while Windows/Linux fall back to the custom picker with the shareAudio toggle for echo control.
This commit is contained in:
+12
@@ -1,5 +1,13 @@
|
||||
/** Type augmentation for the Electron IPC bridge exposed by preload.ts */
|
||||
|
||||
interface ElectronScreenSource {
|
||||
id: string; // "screen:0:0" or "window:12345:0"
|
||||
name: string; // "Entire Screen" or "Firefox"
|
||||
thumbnailDataUrl: string; // PNG data URL at 320×180
|
||||
appIconDataUrl: string | null; // App icon (windows only)
|
||||
isScreen: boolean; // true = display, false = window
|
||||
}
|
||||
|
||||
interface BackspaceElectronAPI {
|
||||
// Platform info
|
||||
platform: NodeJS.Platform;
|
||||
@@ -26,6 +34,10 @@ interface BackspaceElectronAPI {
|
||||
// Deep linking (Task 2.3)
|
||||
onDeepLink: (callback: (url: string) => void) => void;
|
||||
|
||||
// Screen share picker coordination
|
||||
onScreenShareSources: (callback: (sources: ElectronScreenSource[]) => void) => void;
|
||||
selectScreenSource: (sourceId: string | null, shareAudio?: boolean) => void;
|
||||
|
||||
// Instance URL management
|
||||
getInstanceUrl: () => Promise<string | null>;
|
||||
setInstanceUrl: (url: string) => Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user