Skip to content

Media Capture and Streams - capabilities, constraints, and settings data not correctly represented #27119

Open
@chrisdavidmills

Description

@chrisdavidmills

What type of issue is this?

Other

What information was incorrect, unhelpful, or incomplete?

Chrome 136+ supports the MediaTrackSettings.screenPixelRatio property, on desktop only. See https://chromestatus.com/feature/6738236535472128 for details.

The thing with Media Capture and Streams is that you have these properties that can act as capabilities, constraints, and settings.

The way these have been represented historically in BCD is as sub-data items under the MediaStreamTrack.applyConstraints() method. These same data points have been used for the browser compat tables on the MediaStreamTrack.applyConstraints() page, AND on the pages under MediaTrackConstraints and MediaTrackSettings.

Possibly other places too.

This has mostly worked so far, as the properties are generally usable as constraints, capabilities, and settings. However, it doesn't work for screenPixelRatio, because it is a setting only; the spec specifically states that it is not usable as a constraint or capability. So, to represent it as api.MediaStreamTrack.applyConstraints.screenPixelRatio_constraint would make no sense whatsoever.

Ideally, IMO, we should have separate BCD objects for MediaTrackSettings and MediaTrackConstraints, especially given that we have separate MDN pages for them. The latter could also be used for the associated MediaStreamTrack.applyConstraints() method, rather than the other way round. Even without this problem I've uncovered, it is still confusing as-is.

However, the guidelines state that we shouldn't add interface-like entries for dictionaries and should instead add the features separately to all affected methods, properties, etc. (see https://github.com/mdn/browser-compat-data/blob/main/docs/data-guidelines/api.md#dictionaries-and-enumerations-enums).

This is going to be a huge pain to sort out, especially for something I was expecting to be a single data point addition, and I don't have time to figure this all out right now. I am therefore recording this issue for now, so it doesn't get forgotten about.

What browsers does this problem apply to, if applicable?

No response

What did you expect to see?

data that works

Did you test this? If so, how?

No

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

No

Do you have anything more you want to share?

No response

MDN URL

No response

MDN metadata

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    data:apiCompat data for Web APIs. https://developer.mozilla.org/docs/Web/APImeeting agendaIssues or pull requests in need of discussion in a project meeting.needs triageThis issue needs to be confirmed

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions