mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-25 07:16:02 +00:00
fix(sources): gracefully handle desktopCapturer.getSources failure
Catch errors from desktopCapturer.getSources() in the get-sources IPC handler and return an empty array instead of crashing the handler. Prevents repeated 'Failed to get sources' errors when screen recording permission is not granted (common in dev mode on macOS 26).
This commit is contained in:
@@ -2815,6 +2815,9 @@ export function registerIpcHandlers(
|
||||
? await desktopCapturer.getSources({
|
||||
...opts,
|
||||
types: electronTypes,
|
||||
}).catch((error) => {
|
||||
console.warn('desktopCapturer.getSources failed (screen recording permission may be missing):', error)
|
||||
return []
|
||||
})
|
||||
: []
|
||||
const ownWindowNames = new Set(
|
||||
|
||||
Reference in New Issue
Block a user