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
Add Screen Capture API options and constraints #18264
Add Screen Capture API options and constraints #18264
Conversation
api/CaptureController.json
Outdated
"chrome": { | ||
"version_added": "109" | ||
}, | ||
"chrome_android": "mirror", |
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.
CaptureController
is NOT available on mobile, only on desktop as getDisplayMedia is supported only on Chrome for desktop. See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5;l=468;drc=1bdc259c97e0cfc63a958ec6eacf49640342777c
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.
Fixed
api/CaptureController.json
Outdated
"chrome": { | ||
"version_added": "109" | ||
}, | ||
"chrome_android": "mirror", |
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.
Ditto
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.
Fixed
api/CaptureController.json
Outdated
"chrome": { | ||
"version_added": "109" | ||
}, | ||
"chrome_android": "mirror", |
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.
Same
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.
Fixed
"version_added": "109" | ||
}, | ||
"chrome_android": { | ||
"version_added": false |
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.
We're good there ;)
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.
Good good
}, | ||
"preferCurrentTab_option": { | ||
"__compat": { | ||
"description": "<code>preferCurrentTab</code> option", |
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.
You may want to link to https://wicg.github.io/prefer-current-tab/ in a "spec_url" field
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.
I tried this, but then the linter failed because it reckons it's not an official spec...so I've just left this one.
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.
Shall we add this spec to https://github.com/w3c/browser-specs/blob/main/specs.json so that it's possible to link to it in a follow-up PR?
Cheers for the review @beaufortfrancois ! Fixes made. Can you have another quick look and give the PR your blessing, then I'll get someone to merge it. |
LGTM! Thank you @chrisdavidmills |
@queengooborg this one has been tech reviewed. Can you have a look and see if it is ready to merge when you get the chance? |
Summary
This PR adds several options and constraints that were added to the Screen Capture API recently. The additions are explained in my research document: https://docs.google.com/document/d/1HUZMVu_hGTUdkThLhqrUDMBKqvFS5YNRs0xGEHIYaMY/edit#heading=h.oieqm2j8cv9l
Test results and supporting details
Chrome version support verified with the relevant Chromium engineers.
Related issues