New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: session.setDisplayMediaRequestHandler #30702
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API looks good to me.
I have two vague concerns about this API.
For (2) here, by "intricate", I mean things like: how should an app differently handle Also, should this same API be responsible for handling |
Converting to draft because I think this needs some thought before it's ready to be merged. |
docs/api/session.md
Outdated
* `request` Object | ||
* `frame` [WebFrameMain](web-frame-main.md) - frame that is requesting access to media | ||
* `type` String - Type of request. Can be 'deviceAccess', 'deviceUpdate', 'generateStream' or 'openDevicePepperOnly'. | ||
* `audioType` String - can be 'deviceAudioCapture', 'displayAudioCapture' or 'noService'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could these be 'device', 'display', and null
? The 'AudioCapture' is redundant since the key is 'audioType'.
NB let's make sure we support |
Co-authored-by: Samuel Attard <sam@electronjs.org>
Release Notes Persisted
|
Hello! |
this is in v22. |
Does this support constraints like frameRate, width, height yet? |
@dtzxporter are you having trouble with those? |
@nornagon I had just taken a look at the pull, in the tests it seemed to just supply true/false, I am mainly curious if passing constraints directly to getDisplayMedia are supported or if we have to use applyConstraints right now, (Which, is horribly broken in chrome/chromium) |
@dtzxporter there's nothing in this PR that specifically supports or doesn't support those constraints; they should work the same as they do in chrome I believe. |
@nornagon Hello. Sorry for the ping but I have two questions:
Thanks! |
@nornagon Does this include cursor constraints per #30702 (comment)? |
See electron/electron#30702 - this has the benefit of the js-sdk and LiveKit not having to add custom logic for Electron Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
See electron/electron#30702 - this has the benefit of the js-sdk and LiveKit not having to add custom logic for Electron Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
See electron/electron#30702 - this has the benefit of the js-sdk and LiveKit not having to add custom logic for Electron Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
See electron/electron#30702 - this has the benefit of the js-sdk and LiveKit not having to add custom logic for Electron Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
See electron/electron#30702 - this has the benefit of the js-sdk and LiveKit not having to add custom logic for Electron Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
See electron/electron#30702 - this has the benefit of the js-sdk and LiveKit not having to add custom logic for Electron Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Description of Change
This allows Electron apps to support responding to
navigator.mediaDevices.getDisplayMedia
. Closes #16513.Checklist
npm test
passesRelease Notes
Notes: Added support for
navigator.mediaDevices.getDisplayMedia
via a new session handler,ses.setDisplayMediaRequestHandler
.