whatwg / html

HTML Standard
https://html.spec.whatwg.org/multipage/
Other
8.01k stars 2.62k forks source link

HTML Video and its Source Elements Should Support SRCSET and SIZES #10379

Open scottjehl opened 3 months ago

scottjehl commented 3 months ago

What is the issue with the HTML Standard?

Now that video allows for sources that offer different media attributes, there's nice parity with the way the picture element behaves. However, the video element and its source elements only support the src attribute, unlike img and the picture element's source elements which support srcset and sizes.

Support for srcset and sizes attributes would allow developers to deliver video based on conditions the browser knows best. It would offer a resolution based delivery for cases where art direction is less important.

This is a proposal for both:

<video srcset="..." sizes="...">

and

<video>
<source srcset="..." sizes="...">
</video>

Thanks!

annevk commented 1 month ago

cc @whatwg/media