Skip to content

Add lazy-loading for <video> and <audio> feature#3837

Merged
ddbeck merged 8 commits intoweb-platform-dx:mainfrom
hjanuschka:add-loading-lazy-media
Mar 6, 2026
Merged

Add lazy-loading for <video> and <audio> feature#3837
ddbeck merged 8 commits intoweb-platform-dx:mainfrom
hjanuschka:add-loading-lazy-media

Conversation

@hjanuschka
Copy link
Contributor

Summary

Adds a new loading-lazy-media feature for the loading="lazy" attribute on <video> and <audio> elements.

This extends the existing lazy-loading behavior (already available for <img> and <iframe> via the loading-lazy feature) to media elements.

Context

Feature details

  • ID: loading-lazy-media
  • Name: Lazy-loading media elements
  • Spec: https://html.spec.whatwg.org/multipage/urls-and-fetching.html#lazy-loading-attributes
  • Group: media-elements
  • Status: baseline: false (no browser ships this yet)
  • compat_features: omitted -- no BCD keys exist yet. Keys like html.elements.video.loading, html.elements.audio.loading, api.HTMLVideoElement.loading, and api.HTMLAudioElement.loading should be added once they land in BCD.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Mar 3, 2026
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

Thanks for opening this, @hjanuschka. Some suggestions in line comments.

Also, if Fyrd/caniuse#7488 merges first, then you must add caniuse: loading-lazy-media.

If this PR merges first, then I would recommend closing the caniuse PR.

hjanuschka and others added 4 commits March 5, 2026 22:20
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
@github-actions github-actions bot added the tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings label Mar 5, 2026
@hjanuschka hjanuschka requested a review from ddbeck March 5, 2026 21:25
@hjanuschka
Copy link
Contributor Author

all done :)

Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

OK, cool. I'm going to merge main into this branch, which ought to make the tests pass.

@@ -0,0 +1,12 @@
name: Lazy-loading media
Copy link
Collaborator

Choose a reason for hiding this comment

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

More a note for any other maintainers watching: so now we have a situation where caniuse has beaten us to the punch and we've got a different name. I like that our name matches the rest of the feature set, so I'm not going to suggest changing it here, but it would have been nice to align with Alexis. 😞 I've put this on the agenda for he and I to talk about it on our next call.

@ddbeck ddbeck changed the title Add loading-lazy-media feature: lazy-loading for <video> and <audio> Add lazy-loading for <video> and <audio> feature Mar 6, 2026
@ddbeck ddbeck changed the title Add lazy-loading for <video> and <audio> feature Add lazy-loading for <video> and <audio> feature Mar 6, 2026
@ddbeck ddbeck enabled auto-merge (squash) March 6, 2026 17:26
@ddbeck ddbeck merged commit 0d941f5 into web-platform-dx:main Mar 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features. tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants