Skip to content

FF152 MediaCapabilities.decodingInfo/encodingInfo() - config.type.webrtc option#29739

Merged
Elchi3 merged 4 commits into
mdn:mainfrom
hamishwillee:ff152_MediaCapabilities.decodinginfo_encoding
Jun 19, 2026
Merged

FF152 MediaCapabilities.decodingInfo/encodingInfo() - config.type.webrtc option#29739
Elchi3 merged 4 commits into
mdn:mainfrom
hamishwillee:ff152_MediaCapabilities.decodinginfo_encoding

Conversation

@hamishwillee

@hamishwillee hamishwillee commented May 25, 2026

Copy link
Copy Markdown
Contributor

FF152 adds support for the configuration.type.webrtc option to be passed to MediaCapabilities.decodingInfo() and MediaCapabilities.encodingInfo() , and removes the non-standard "alias" transmission that has been around since FF63ish. The addition is behind the flag media.mediacapabilities.webrtc.enabled. Bug is https://bugzilla.mozilla.org/show_bug.cgi?id=1825286

To do this I have created a structure of nested features to mirror the configuration option, which has type property, and below that has the new webrtc and transmission (to be removed when this is merged). Also moved an existing key below that configuraiton option.

Related docs work can be tracked in mdn/content#44174

@github-actions github-actions Bot added data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:l [PR only] 101-1000 LoC changed labels May 25, 2026
@github-actions

github-actions Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

Comment thread api/MediaCapabilities.json Outdated
Comment thread api/MediaCapabilities.json
@hamishwillee hamishwillee force-pushed the ff152_MediaCapabilities.decodinginfo_encoding branch from 3eb8c5e to ea86bfa Compare June 2, 2026 03:46
@Elchi3

Elchi3 commented Jun 2, 2026

Copy link
Copy Markdown
Member

To understand this PR, is the following the desired nesting?
Also, I guess, I'm a little unclear what we call parameter vs. option.

MediaCapabilities:

  • decodingInfo method
    • configuration_parameter
      • keySystemConfiguration_parameter (option?)
      • type_parameter (option?)
        • webrtc_option
  • encodingInfo method
    • configuration_parameter
    • type_parameter (option?)
      • transmission_option
      • webrtc_option

@Elchi3

Elchi3 commented Jun 2, 2026

Copy link
Copy Markdown
Member

From https://github.com/mdn/browser-compat-data/blob/main/docs/data-guidelines/README.md#parameters-and-parameter-object-features

For properties of parameter objects, use a subfeature named paramname_prop_parameter with description text paramname.prop parameter, where paramname is the name of the parameter object and prop is the name of the property.

Is this the rule? I think you have more recent experience with nested data structures. Would like to hear your thoughts.

@hamishwillee hamishwillee force-pushed the ff152_MediaCapabilities.decodinginfo_encoding branch from ea86bfa to a7b62fd Compare June 5, 2026 02:41
…alues

Use fetch API convention: configuration_parameter as parent, sub-properties
as plain names with "property" descriptions nested inside it, and _option
suffix for enum values of the type property.
@hamishwillee hamishwillee force-pushed the ff152_MediaCapabilities.decodinginfo_encoding branch from a7b62fd to 805c65c Compare June 5, 2026 03:00
@hamishwillee

Copy link
Copy Markdown
Contributor Author

Thanks @Elchi3.

  1. Yes, I was trying to achieve exactly the nesting you show above in FF152 MediaCapabilities.decodingInfo/encodingInfo() - config.type.webrtc option #29739 (comment)
  2. A parameter is a top level object, a property is a property of that object, and an option is an enumerated value of a property or parameter.
  3. I updated the original pr you looked at with this commit 7d24f9e - this is based on fetch() - I got a few things wrong in the first instance. This is nested and uses the convention I understand. Note, Claude helped.
  4. I updated again with another commit. This (current) version is flat, and is based on the schema link you provided. In that everything is flat, and the naming convention maps the structure. This doesn't use the term option, because the schema doesn't cover how you should document such a case.

I used to do the schema defined way, but have been told recently (and asked to modify my PRs) to support a nested form. I recalled "option" being used for enumerated values but I can't find evidence of that.
So I'd say that people are working on a new approach but that the schema has not been updated. I have partially learned that and relied on reviewers to correct me.

We this needs to be discussed in the BCD meeting to confirm the schema and naming convention to use and then I can match it. My preference is nested "FWIW" - it just feels cleaner and more logical - provided the rendering in MDN works adequately. If that happens ideally I can just drop the last commit.

@Elchi3 Elchi3 added the meeting agenda Issues or pull requests in need of discussion in a project meeting. label Jun 5, 2026
@Elchi3

Elchi3 commented Jun 16, 2026

Copy link
Copy Markdown
Member

We this needs to be discussed in the BCD meeting to confirm the schema and naming convention to use and then I can match it. My preference is nested "FWIW" - it just feels cleaner and more logical - provided the rendering in MDN works adequately. If that happens ideally I can just drop the last commit.

Thanks Hamish, this is exactly spot on. We also agreed that nesting is better and that we even have better validation/linting in place if features are properly nested.

The guidelines are old and need to be rewritten. They were in fact written because MDN couldn't render deeply nested structures but we believe this is no longer the case.

If you could drop the last commit and go back to nested, that would be great!

Daniel also noted that there is prior art in this Fetch PR for a good structure: #29451

We should be using names from the specification but roughly, it should be like this.

  • someMethod
    • options_parameter
      • propA
      • propB
      • propC_options_parameter (we don't need the longer names)

Expect an issue (and a PR) on the BCD guidelines soon. Sorry for the back and forth.

@hamishwillee

Copy link
Copy Markdown
Contributor Author

Thanks @Elchi3

I've reverted the last commit so this should be good to review.

From the guideline PR #29856 it is not clear if the property needs a prefix in its key name (assume not) or if options values need a prefix. See #29856 (comment)

@Elchi3 Elchi3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks Hamish! I think this can be merged now.

@Elchi3 Elchi3 merged commit 5ce26f1 into mdn:main Jun 19, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in BCD meeting agenda Jun 19, 2026
@mdn-bot mdn-bot mentioned this pull request Jun 19, 2026
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 meeting agenda Issues or pull requests in need of discussion in a project meeting. size:l [PR only] 101-1000 LoC changed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants