Skip to content

Add loading attribute to audio and video#29256

Draft
tunetheweb wants to merge 4 commits intomdn:mainfrom
tunetheweb:lazy-load-media
Draft

Add loading attribute to audio and video#29256
tunetheweb wants to merge 4 commits intomdn:mainfrom
tunetheweb:lazy-load-media

Conversation

@tunetheweb
Copy link
Contributor

@tunetheweb tunetheweb commented Mar 13, 2026

Summary

We're adding loading=lazy to <audio> and <video> attributes!

Coming to Chrome in 147 (behind a flag): https://chromestatus.com/feature/5200068565139456

FYI: @scottjehl @hjanuschka

Test results and supporting details

Audio:
https://wpt.fyi/results/html/semantics/embedded-content/the-audio-element?label=experimental&label=master&aligned

Video:
https://wpt.fyi/results/html/semantics/embedded-content/the-video-element?label=experimental&label=master&aligned

https://chromestatus.com/feature/5200068565139456

Implementation bugs:

Firefox and Safari implementations are being actively worked on but, as per policy, I've left this marked as "experimental" until two implementations land in stable.

More details:

Related issues

See spec updates here: whatwg/html#11980. We should wait for that to land any second now, so leaving this in draft for now.

Content PR: mdn/content#43434

Makes progress on: mdn/mdn#809

@github-actions github-actions bot added data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML size:l [PR only] 101-1000 LoC changed labels Mar 13, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

},
"loading": {
"__compat": {
"spec_url": "https://html.spec.whatwg.org/multipage/media.html#attr-media-loading",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fragment doesn't work for me, presumably because whatwg/html#11980 isn't merged yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. Oh I didn't set this to draft because of that despite saying I would in the original comment. Apologies!

Copy link
Contributor Author

@tunetheweb tunetheweb Mar 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's odd. I can't seem to convert this to draft. Clicking the "Convert to draft" link opens the dialog but then clicking the button does nothing! Can you click that @caugner ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I clicked the button. No idea why it worked for me.

@hamishwillee hamishwillee marked this pull request as draft March 15, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML size:l [PR only] 101-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants