mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
feat: add support for system picker in setDisplayMediaRequestHandler (#43581)
* tmp * feat: add support for system picker in setDisplayMediaRequestHandler * oops * Apply suggestions from code review Co-authored-by: Erick Zhao <erick@hotmail.ca> * stuff * well... * seems legit * chore: update patch to handle screenCapturer * feat: modify API to use useSystemPicker * fix: gate ScreenCaptureKitPicker to macos 15 or higher * fix: don't use native picker with legacy media selection * chore: code review, boolean set & docs update * fix: add cancelCallback * docs: clarify session & desktopCapturer docs --------- Co-authored-by: Samuel Attard <marshallofsound@electronjs.org> Co-authored-by: Samuel Attard <sam@electronjs.org> Co-authored-by: Erick Zhao <erick@hotmail.ca>
This commit is contained in:
@@ -20,7 +20,11 @@ app.whenReady().then(() => {
|
||||
// Grant access to the first screen found.
|
||||
callback({ video: sources[0], audio: 'loopback' })
|
||||
})
|
||||
})
|
||||
// If true, use the system picker if available.
|
||||
// Note: this is currently experimental. If the system picker
|
||||
// is available, it will be used and the media request handler
|
||||
// will not be invoked.
|
||||
}, { useSystemPicker: true })
|
||||
|
||||
mainWindow.loadFile('index.html')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user