Open Bug 2005072 Opened 9 months ago Updated 1 month ago

Implement HTML video and audio element lazy-loading via the loading attribute

Categories

(Core :: Audio/Video, enhancement, P3)

enhancement

Tracking

()

REOPENED

People

(Reporter: sjehl, Assigned: sjehl, NeedInfo)

References

Details

(Keywords: dev-doc-needed, Whiteboard: web-feature)

User Story

web-feature: loading-lazy-media

Attachments

(1 file, 1 obsolete 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.

Assignee: nobody → scottjehl
Severity: -- → S4
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P3

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>

Web Platform Tests for this feature are in this PR https://github.com/web-platform-tests/wpt/pull/57051

Summary: Implement HTML video element lazy-loading via the loading attribute → Implement HTML video and audio element lazy-loading via the loading attribute

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.

Attachment #9536737 - Attachment description: Bug 2005072 - Implement proposed loading attribute for video elements. r?#dom-core → Bug 2005072 - Implement proposed loading attribute for video and audio elements. r?#dom-core

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

Keywords: dev-doc-needed
Attachment #9596566 - Attachment is obsolete: true
User Story: (updated)
Whiteboard: web-feature
Pushed by kcirkel@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ef3838d71d92 https://hg.mozilla.org/integration/autoland/rev/b7de4f271805 Implement proposed loading attribute for video and audio elements. r=dom-core-reviewers,media-playback-reviewers,webidl,layout-reviewers,smaug,emilio,pehrsons,alwu
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3491d6d69955 https://hg.mozilla.org/integration/autoland/rev/2e19012f03e4 Revert "Bug 2005072 - Implement proposed loading attribute for video and audio elements. r=dom-core-reviewers,media-playback-reviewers,webidl,layout-reviewers,smaug,emilio,pehrsons,alwu" for causing build bustages @nsHtml5TreeBuilderCppSupplement.h.

Backed out for causing build bustages @nsHtml5TreeBuilderCppSupplement.h.

Flags: needinfo?(sjehl)
Pushed by kcirkel@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b87ecd50c3a9 https://hg.mozilla.org/integration/autoland/rev/49629aaa8e12 Implement proposed loading attribute for video and audio elements. r=dom-core-reviewers,media-playback-reviewers,webidl,layout-reviewers,smaug,emilio,pehrsons,alwu,keithamus
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Pushed by csabou@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/99297e21b4e0 https://hg.mozilla.org/integration/autoland/rev/9ed5ad02bcb1 Revert "Bug 2005072 - Implement proposed loading attribute for video and audio elements. r=dom-core-reviewers,media-playback-reviewers,webidl,layout-reviewers,smaug,emilio,pehrsons,alwu,keithamus" for causing wpt leaks.

Backed out for causing wpt leaks.

Push with failures

Failure log

Backout link

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 154 Branch → ---
Pushed by kcirkel@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1fca953fb7af https://hg.mozilla.org/integration/autoland/rev/c7533b57a035 Implement proposed loading attribute for video and audio elements. r=dom-core-reviewers,media-playback-reviewers,webidl,layout-reviewers,smaug,emilio,pehrsons,alwu,keithamus
Pushed by amarc@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c25b920fb529 https://hg.mozilla.org/integration/autoland/rev/102b1c9a208c Revert "Bug 2005072 - Implement proposed loading attribute for video and audio elements. r=dom-core-reviewers,media-playback-reviewers,webidl,layout-reviewers,smaug,emilio,pehrsons,alwu,keithamus" for causing wpt leaks @ SetCapacity

Backed out for causing wpt leaks

Redirect a needinfo that is pending on an inactive user to the triage owner.
:jimm, since the bug has recent activity, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(sjehl) → needinfo?(jmathies)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: