Skip to content

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

Open
hamishwillee wants to merge 5 commits into
mdn:mainfrom
hamishwillee:ff152_MediaCapabilities.decodinginfo_encoding
Open

FF152 MediaCapabilities.decodingInfo/encodingInfo() - config.type.webrtc option#29739
hamishwillee wants to merge 5 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
"firefox": {
"version_added": "63",
"notes": [
"The `webrtc` value of the `type` option is named `transmission`.",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This must have been wrong originally. If you look at https://hg-edge.mozilla.org/mozilla-central/rev/95e6d0dc0f14 you can see this change

 enum MediaDecodingType {
   "file",
   "media-source",
+  "webrtc",
 };
 
 enum MediaEncodingType {
   "record",
-  "transmission"
+  "webrtc",
 };

So the encoding type had the transmission option, and the decoding type did not. That is the opposite of here. I've removed it from decoding below in 3b7ccfa

@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.
Flatten structure per HTMLCanvasElement convention: all subfeatures are
siblings under the method using fully-qualified paramname_prop_parameter
keys, with enum values as paramname_prop_parameter_value.
@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
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: Todo

Development

Successfully merging this pull request may close these issues.

2 participants