Skip to content
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

Merged

Conversation

chrisdavidmills
Copy link
Collaborator

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

@chrisdavidmills chrisdavidmills marked this pull request as draft November 23, 2022 13:31
@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Nov 23, 2022
"chrome": {
"version_added": "109"
},
"chrome_android": "mirror",
Copy link
Contributor

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

"chrome": {
"version_added": "109"
},
"chrome_android": "mirror",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

"chrome": {
"version_added": "109"
},
"chrome_android": "mirror",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Copy link
Collaborator Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're good there ;)

Copy link
Collaborator Author

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",
Copy link
Contributor

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

Copy link
Collaborator Author

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.

Copy link
Contributor

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?

@chrisdavidmills
Copy link
Collaborator Author

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.

@chrisdavidmills chrisdavidmills marked this pull request as ready for review December 5, 2022 07:03
@beaufortfrancois
Copy link
Contributor

LGTM! Thank you @chrisdavidmills

@chrisdavidmills
Copy link
Collaborator Author

@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?

@queengooborg queengooborg merged commit e8cb840 into mdn:main Dec 18, 2022
@chrisdavidmills chrisdavidmills deleted the update-screencapture-constraints-data branch December 18, 2022 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants