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:
@@ -50,6 +50,14 @@ contextBridge.exposeInMainWorld('backspace', {
|
||||
ipcRenderer.on('deep-link', (_event, url) => callback(url));
|
||||
},
|
||||
|
||||
// Screen share picker coordination
|
||||
onScreenShareSources: (callback: (sources: unknown[]) => void) => {
|
||||
ipcRenderer.on('screen-share-sources', (_event, sources) => callback(sources));
|
||||
},
|
||||
selectScreenSource: (sourceId: string | null, shareAudio?: boolean) => {
|
||||
ipcRenderer.send('screen-share-selected', sourceId, shareAudio ?? true);
|
||||
},
|
||||
|
||||
// Instance URL management
|
||||
getInstanceUrl: () => ipcRenderer.invoke('get-instance-url'),
|
||||
setInstanceUrl: (url: string) => ipcRenderer.invoke('set-instance-url', url),
|
||||
|
||||
Reference in New Issue
Block a user