Add loading attribute for audio and video#43434
Conversation
files/en-us/learn_web_development/extensions/performance/html/index.md
Outdated
Show resolved
Hide resolved
files/en-us/learn_web_development/extensions/performance/html/index.md
Outdated
Show resolved
Hide resolved
hamishwillee
left a comment
There was a problem hiding this comment.
Thanks @tunetheweb . I'd prefer to wait until BCD data is accepted before we merge this. Otherwise it is not obvious that this feature is not actually avaiable on any browser.
hamishwillee
left a comment
There was a problem hiding this comment.
A few nits added but this looks good. Won't mark as approved until BCD goes in, because otherwise someone is likely to merge prematurely.
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
|
Thanks Hamish! Hopefully that Spec PR gets merged soon and the rest of these PRs can fall like dominoes 😁 Also happy to convert this PR to draft in the meantime if that’s easier for you all. |
|
Thanks Barry. Yeah, I'll press that convert to draft button now. If you don't mind doing this in two phases you can probably get this in without waiting for the spec. Essentially BCD could go in without the spec and this would be "non-standard" - and then this PR could merge. Then when the spec goes in you'd update BCD and the docs would automatically update this to no longer be non-standard. |
|
The spec PR is all but approved IIUC. To be honest I expected the review of both my PRs to take longer and that to be merged by the time this was finished! But you’re all too efficient! 😁 So will give it another few days. Of it drags on and the Chrome implementation lands then will reconsider as quite like having things documented when available. Then again if marked as “non-standard” then it might put some people off anyway! |
Co-authored-by: Zachary Lysobey <zach@lysobey.com>
Co-authored-by: Zachary Lysobey <zach@lysobey.com>
|
The spec PR has now been merged. |
pepelsbey
left a comment
There was a problem hiding this comment.
Looks good! Thank you 🙂
Just a small suggestion.
Co-authored-by: Vadim Makeev <hi@pepelsbey.dev>
|
Thanks @pepelsbey ! @hamishwillee suggested above we want for the BCD PR to be merged first, which is probably a good idea. I probably should have left this in draft until that was done so put that back. Hopefully that one should be merged soon. |
|
I changed the list of related PRs in the description to checklist. It usually helps to convey the message. |
|
This looks great. Still in draft? Is there a timeline on when it'll merge to MDN? Thanks. |
|
BCD v7.3.9 was just released containing these changes. So think this is good to merge now! If you could do the honours @hamishwillee or @pepelsbey ? |
|
Perfect! Thank you ❤️ |
Description
We're adding
loading=lazyto<audio>and<video>attributes!Coming to Chrome in 147 (behind a flag): https://chromestatus.com/feature/5200068565139456
FYI: @scottjehl @hjanuschka
Motivation
More details:
https://scottjehl.com/posts/lazy-media/ (with a demo of it working)
https://www.januschka.com/chromium-video-lazy-loading.html
Additional details
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:
Related issues and pull requests
Makes progress on: mdn/mdn#809
loadingattribute to audio/video behind flag browser-compat-data#29256