Intent to implement and ship: Media query support for video <source> elements

167 views
Skip to first unread message

Dale Curtis

unread,
Oct 5, 2023, 3:11:46 PM10/5/23
to blink-dev, Philip Jägenstedt

Contact emails

dalec...@chromium.org

Explainer

None

Specification

https://html.spec.whatwg.org/multipage/media.html#loading-the-media-resource

Design docs


https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#media

Summary

Adds support for CSS media queries to <source> elements used with <video> elements. Allowing developers to use media query syntax to tell the browser which source should be preferred for a given environment.



Blink component

Blink>Media>Video

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

Chromium used to support this feature, but it was deprecated and removed in https://bugs.chromium.org/p/chromium/issues/detail?id=338197 -- foolip@ now believes this removal was incorrect.



Gecko: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1836128)

WebKit: Shipped/Shipping (https://github.com/whatwg/html/issues/6363#issuecomment-1556228111)

Web developers: Positive (12 stars on the issue. Developers are passionate enough to implement the feature themselves in Firefox)

Other signals:

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?

None



Debuggability

None



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/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-source-media-env-change.html?label=master&label=experimental&aligned



Flag name on chrome://flags

None

Finch feature name

VideoSourceMediaQuerySupport

Requires code in //chrome?

False

Tracking bug

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

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).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5144127067127808

This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Oct 5, 2023, 3:53:50 PM10/5/23
to Dale Curtis, blink-dev, Philip Jägenstedt
LGTM1

Thanks for correcting this historical mistake!


On Thu, Oct 5, 2023, 21:11 Dale Curtis <dalec...@chromium.org> wrote:

Contact emails

dalec...@chromium.org

Explainer

None

We could almost use MDN as the explainer, other than my comment below.
MDN still says the media on<source> is only allowed with a <picture> parent. Could y'all file an issue to get that fixed?



Summary

Adds support for CSS media queries to <source> elements used with <video> elements. Allowing developers to use media query syntax to tell the browser which source should be preferred for a given environment.



Blink component

Blink>Media>Video

TAG review

None

Not required as it's part of the spec and shipped in other implementations.

--
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/CAPUDrwcJ42qj-ddQQcRi8f-YmfmzbkU-VStxdeM%2By_8u3%3Dh9-Q%40mail.gmail.com.

Chris Harrelson

unread,
Oct 5, 2023, 4:13:10 PM10/5/23
to Yoav Weiss, Dale Curtis, blink-dev, Philip Jägenstedt

Dale Curtis

unread,
Oct 5, 2023, 4:14:19 PM10/5/23
to Yoav Weiss, blink-dev, Philip Jägenstedt
Thanks!

On Thu, Oct 5, 2023 at 12:53 PM Yoav Weiss <yoav...@chromium.org> wrote:
LGTM1

Thanks for correcting this historical mistake!

On Thu, Oct 5, 2023, 21:11 Dale Curtis <dalec...@chromium.org> wrote:

Contact emails

dalec...@chromium.org

Explainer

None

We could almost use MDN as the explainer, other than my comment below.


MDN still says the media on<source> is only allowed with a <picture> parent. Could y'all file an issue to get that fixed?

Scott Jehl

unread,
Oct 5, 2023, 4:36:25 PM10/5/23
to blink-dev, Dale Curtis, blink-dev, Philip Jägenstedt, Yoav Weiss
Thanks!!

Alex Russell

unread,
Oct 5, 2023, 5:10:45 PM10/5/23
to blink-dev, Scott Jehl, Dale Curtis, blink-dev, Philip Jägenstedt, Yoav Weiss
LGTM3
Reply all
Reply to author
Forward
0 new messages