Intent to Ship: MediaCapabilities: Query HDR support with decodingInfo()

102 views
Skip to first unread message

Dale Curtis

unread,
Oct 18, 2023, 7:18:44 PM10/18/23
to blink-dev

Contact emails

vi...@microsoft.comgw...@microsoft.comgur...@microsoft.comdalec...@chromium.org

Explainer

https://github.com/w3c/media-capabilities/blob/main/explainer.md#decode-capabilities

Specification

https://www.w3.org/TR/media-capabilities/#hdrmetadatatype

Summary

Extends the Media Capabilities API to allow detection of HDR rendering support via three new VideoConfiguration dictionary fields: hdrMetadataType, colorGamut, transferFunction. Chromium implements its own tone-mapping algorithms so will always return true for HDR10 (smpteSt2086) static metadata. HDR10+ (smpteSt2094-10) and Dolby Vision (smpteSt2094-40) dynamic metadata are not currently supported, so will return false. We anticipate adding support for dynamic metadata in the future, so this API will allow developers to select the appropriate content for users with support.



Blink component

Blink>Media>Capabilities

TAG review

Already shipping by another UA. The now-closed Media Capabilities TAG review covered similar discussions: https://github.com/w3ctag/design-reviews/issues/218

TAG review status

Not applicable

Risks



Interoperability and Compatibility

Low interop risk: Already shipping in Safari.



Gecko: Neutral (https://github.com/mozilla/standards-positions/issues/910)

WebKit: Shipped/Shipping (https://www.w3.org/2019/11/19-mediawg-minutes.html)

Web developers: Positive (https://github.com/w3c/media-capabilities/issues/118#issuecomment-511461132)

Other signals:

Activation

Will start returning false for some DolbyVision and HDR10+ metadata types on the web -- playback would have been broken already for these.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No risks unique to WebView.



Debuggability

Debuggable through media dev tools and chrome://gpu information.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

https://wpt.fyi/results/media-capabilities/decodingInfo.any.html?label=experimental&label=master&aligned



Flag name on chrome://flags



Finch feature name

MediaCapabilitiesDynamicRange

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1048045

Estimated milestones

Shipping on desktop120
Shipping on Android120
Shipping on WebView120


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

Spec changes have already been submitted since the feature is shipping in Safari.

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6640863931269120

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/jBzVLBz-Yk4/m/ORuQg2zAEwAJ

This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Oct 25, 2023, 11:29:58 AM10/25/23
to blink-dev, blink-dev


Summary

Extends the Media Capabilities API to allow detection of HDR rendering support via three new VideoConfiguration dictionary fields: hdrMetadataType, colorGamut, transferFunction. Chromium implements its own tone-mapping algorithms so will always return true for HDR10 (smpteSt2086) static metadata. HDR10+ (smpteSt2094-10) and Dolby Vision (smpteSt2094-40) dynamic metadata are not currently supported, so will return false. We anticipate adding support for dynamic metadata in the future, so this API will allow developers to select the appropriate content for users with support.



Blink componentBlink>Media>Capabilities

TAG reviewAlready shipping by another UA. The now-closed Media Capabilities TAG review covered similar discussions: https://github.com/w3ctag/design-reviews/issues/218

TAG review statusNot applicable

Risks


Interoperability and Compatibility

Low interop risk: Already shipping in Safari.



Gecko: Neutral (https://github.com/mozilla/standards-positions/issues/910)

No signal would be more accurate.
 

It's unclear to me how this link indicates WebKit shipping this. Any particular phrase there you wanted to point at?
 
Activation

Will start returning false for some DolbyVision and HDR10+ metadata types on the web -- playback would have been broken already for these.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No risks unique to WebView.



Debuggability

Debuggable through media dev tools and chrome://gpu information.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?Yes

Is this feature fully tested by web-platform-tests?Yes

https://wpt.fyi/results/media-capabilities/decodingInfo.any.html?label=experimental&label=master&aligned



Flag name on chrome://flags

Finch feature nameMediaCapabilitiesDynamicRange

Requires code in //chrome?False

Tracking bughttps://bugs.chromium.org/p/chromium/issues/detail?id=1048045

Estimated milestonesShipping on desktop120Shipping on Android120Shipping on WebView120

Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

Spec changes have already been submitted since the feature is shipping in Safari.

Link to entry on the Chrome Platform Statushttps://chromestatus.com/feature/6640863931269120

Links to previous Intent discussionsIntent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/jBzVLBz-Yk4/m/ORuQg2zAEwAJ

Dale Curtis

unread,
Oct 25, 2023, 12:46:23 PM10/25/23
to Yoav Weiss, blink-dev
On Wed, Oct 25, 2023 at 8:30 AM Yoav Weiss <yoav...@chromium.org> wrote:


On Thursday, October 19, 2023 at 1:18:44 AM UTC+2 blink-dev wrote:
Contact emailsvi...@microsoft.comgwhit@microsoft.comgurvir@microsoft.comdalecurtis@chromium.org

Explainerhttps://github.com/w3c/media-capabilities/blob/main/explainer.md#decode-capabilities

Specificationhttps://www.w3.org/TR/media-capabilities/#hdrmetadatatype

Summary

Extends the Media Capabilities API to allow detection of HDR rendering support via three new VideoConfiguration dictionary fields: hdrMetadataType, colorGamut, transferFunction. Chromium implements its own tone-mapping algorithms so will always return true for HDR10 (smpteSt2086) static metadata. HDR10+ (smpteSt2094-10) and Dolby Vision (smpteSt2094-40) dynamic metadata are not currently supported, so will return false. We anticipate adding support for dynamic metadata in the future, so this API will allow developers to select the appropriate content for users with support.



Blink componentBlink>Media>Capabilities

TAG reviewAlready shipping by another UA. The now-closed Media Capabilities TAG review covered similar discussions: https://github.com/w3ctag/design-reviews/issues/218

TAG review statusNot applicable

Risks


Interoperability and Compatibility

Low interop risk: Already shipping in Safari.



Gecko: Neutral (https://github.com/mozilla/standards-positions/issues/910)

No signal would be more accurate.

That's fair, I marked neutral due to TPAC discussions (https://github.com/w3c/media-capabilities/issues/205#issuecomment-1713986400), but will switch it to no signal. 
 
 

It's unclear to me how this link indicates WebKit shipping this. Any particular phrase there you wanted to point at?

The wpt link and the issue comments above are a better reference (no caniuse here). Sorry, I copied this over from the I2P where it shows agreement on the mechanisms. Code search:

Rick Byers

unread,
Oct 25, 2023, 3:06:37 PM10/25/23
to Dale Curtis, blink-dev
Looks pretty straightforward to me, especially with Safari already shipping. LGTM1
Thanks! Is there a bug filed for the three  tests failing in Chrome?

Flag name on chrome://flags



Finch feature name

MediaCapabilitiesDynamicRange

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1048045

Estimated milestones

Shipping on desktop120
Shipping on Android120
Shipping on WebView120


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

Spec changes have already been submitted since the feature is shipping in Safari.

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6640863931269120

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/jBzVLBz-Yk4/m/ORuQg2zAEwAJ

This intent message was generated by Chrome Platform Status.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPUDrwforrrpNE5RLc_OVa9uwa-63UX03VgijptNU5E8sVcD7g%40mail.gmail.com.

Mike Taylor

unread,
Oct 25, 2023, 3:35:48 PM10/25/23
to Rick Byers, Dale Curtis, blink-dev

Dale Curtis

unread,
Oct 27, 2023, 4:01:39 PM10/27/23
to Mike Taylor, Rick Byers, blink-dev
Looks like this got approved on chrome status, but is still missing an LGTM3. Anyone else want to weigh in?

- dale

Chris Harrelson

unread,
Oct 27, 2023, 4:20:27 PM10/27/23
to Dale Curtis, Mike Taylor, Rick Byers, blink-dev
Reply all
Reply to author
Forward
0 new messages