Implement HTML video and audio element lazy-loading via the loading attribute
Categories
(Core :: Audio/Video, enhancement, P3)
Tracking
()
People
(Reporter: sjehl, Assigned: sjehl)
Details
(Keywords: dev-doc-needed)
Attachments
(1 file)
Steps to reproduce:
This is a request for support for the loading attribute for video and audio elements, which would support lazy-loading for video and audio media.
The loading attribute for video and audio would use similar conventions to img and iframe, where the attribute has precedent, and provides performance benefits. It would have possible values of eager and lazy. When the loading attribute value is lazy, loading of any audio, video or poster image data, as well as autoplay playback, must defer until layout is known and the video is in the viewport.
Issue tracker ticket https://github.com/whatwg/html/pull/11980
Mozilla Standards Position: https://github.com/mozilla/standards-positions/issues/1325
Actual results:
Firefox does not currently offer built-in lazy loading of video or audio.
Expected results:
Firefox should lazy-load video and video elements that have a loading="lazy" attribute.
Updated•1 month ago
|
| Assignee | ||
Comment 1•28 days ago
|
||
This patch implements a proposed loading attribute for video elements, enabling lazy loading of video sources and poster images, and deferring autoplay.
This change is proposed to be added to the HTML spec in the following PR:
https://github.com/whatwg/html/pull/11980
Co-authored-by: Brad Frost <bfrost@squarespace.com>
| Assignee | ||
Comment 2•28 days ago
|
||
Web Platform Tests for this feature are in this PR https://github.com/web-platform-tests/wpt/pull/57051
| Assignee | ||
Updated•15 days ago
|
| Assignee | ||
Comment 3•15 days ago
|
||
Updated issue description to include the audio element in addition to video. Our team is working on next steps to include audio in relevant spec, tests, and browser patches next.
Updated•8 days ago
|
Comment 4•20 hours ago
|
||
As far as I understand, this is implemented behind a pref. So, once the patch lands, a note should be added to https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Experimental_features.
And it may also be worth mentioning in the dev release notes and the general ones (for Nightly).
Sebastian
Description
•