Add lazy-loading for <video> and <audio> feature#3837
Add lazy-loading for <video> and <audio> feature#3837ddbeck merged 8 commits intoweb-platform-dx:mainfrom
<video> and <audio> feature#3837Conversation
ddbeck
left a comment
There was a problem hiding this comment.
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.
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>
|
all done :) |
ddbeck
left a comment
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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.
<video> and <audio> feature
Summary
Adds a new
loading-lazy-mediafeature for theloading="lazy"attribute on<video>and<audio>elements.This extends the existing lazy-loading behavior (already available for
<img>and<iframe>via theloading-lazyfeature) to media elements.Context
loadingFyrd/caniuse#7467Feature details
loading-lazy-mediamedia-elementsbaseline: false(no browser ships this yet)html.elements.video.loading,html.elements.audio.loading,api.HTMLVideoElement.loading, andapi.HTMLAudioElement.loadingshould be added once they land in BCD.