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

Remove MediaStreamConstraints dictionary from BCD #12397

Merged
merged 3 commits into from
Dec 1, 2021

Conversation

queengooborg
Copy link
Contributor

This PR removes the MediaStreamConstraints dictionary from BCD, folding its two parameters into the only function that uses it (api.MediaDevices.getUserMedia). This is also preliminary work for the removal of the MediaTrackConstraints dictionary as well.

@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Sep 15, 2021
@queengooborg queengooborg added needs content update This PR needs a corresponding update to mdn/content to update the documentation needs-release-note 📰 labels Sep 15, 2021
@foolip
Copy link
Contributor

foolip commented Sep 16, 2021

Is there an MDN PR for this?

I don't think that capturing whether audio and video parameters are supported is the thing that matters to web developers, rather it's the next level, constraints like deviceId (all tracks), echoCancellation (audio tracks), or frameRate (video tracks). That's further complicated by exact and ideal in many contexts.

Ultimately I don't think https://github.com/mdn/browser-compat-data/blob/main/docs/data-guidelines.md#parameters-and-parameter-object-features will work here, because something like deviceId isn't one parameter, but a parameter that can appear in many places.

@@ -402,6 +402,102 @@
"deprecated": false
}
},
"constraints_audio_parameter": {
Copy link
Contributor

@saschanaz saschanaz Sep 19, 2021

Choose a reason for hiding this comment

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

I'd like to use this data for automation, is there a written rule to name this? What happens when the spec changes the argument name, e.g. to constraintObject? Will the name here also change?

Copy link
Contributor

Choose a reason for hiding this comment

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

The rules are in https://github.com/mdn/browser-compat-data/blob/main/docs/data-guidelines.md#parameters-and-parameter-object-features. For the most part the names match the spec and I've been changing some to match, but I can't imagine they all match.

I would guess that in the vast majority of cases there's just one dictionary argument and the argument name can be ignored / assumed to match. That only leaves cases with multiple dictionary arguments needing to match on the name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed these subfeatures since their data matches their parent, and as indicated, there's no need for the individual audio and video features anyways!

@queengooborg queengooborg removed their assignment Nov 30, 2021
@queengooborg queengooborg removed the needs content update This PR needs a corresponding update to mdn/content to update the documentation label Nov 30, 2021
@foolip foolip merged commit d84c7b2 into mdn:main Dec 1, 2021
@queengooborg queengooborg deleted the api/MediaStreamConstraints branch December 1, 2021 20:49
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.

4 participants