Open Bug 2005072 Opened 1 month ago Updated 20 hours ago

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

Categories

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

enhancement

Tracking

()

ASSIGNED

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.

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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: