-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Web Platform Tests for HTML video and audio element lazy loading via the loading attribute #57051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Web Platform Tests for HTML video and audio element lazy loading via the loading attribute #57051
Conversation
…g attribute These tests support the proposal for the addition of a loading attribute on the video element, designed to enable lazy-loading for video and poster data. HTML Standard PR here whatwg/html#11980 Co-authored-by: Zach Lysobey <zlysobey@squarespace.com> Co-authored-by: Brad Frost <bfrost@squarespace.com> Co-authored-by: Credo Duarte <cduarte@squarespace.com>
…d with a proposed HTML feature
rename files to use a .tentative.html convention since they correspond with a proposed HTML feature
|
Renamed the files to be |
html/semantics/embedded-content/the-video-element/video-loading-attr-default.tentative.html
Outdated
Show resolved
Hide resolved
.../semantics/embedded-content/the-video-element/video-loading-autoplay-deferred.tentative.html
Outdated
Show resolved
Hide resolved
.../semantics/embedded-content/the-video-element/video-loading-autoplay-deferred.tentative.html
Outdated
Show resolved
Hide resolved
html/semantics/embedded-content/the-video-element/video-loading-eager.tentative.html
Outdated
Show resolved
Hide resolved
.../semantics/embedded-content/the-video-element/video-loading-autoplay-deferred.tentative.html
Outdated
Show resolved
Hide resolved
html/semantics/embedded-content/the-video-element/video-loading-lazy-in-viewport.tentative.html
Outdated
Show resolved
Hide resolved
html/semantics/embedded-content/the-video-element/video-loading-lazy-in-viewport.tentative.html
Outdated
Show resolved
Hide resolved
...ics/embedded-content/the-video-element/video-loading-lazy-poster-when-visible.tentative.html
Outdated
Show resolved
Hide resolved
...semantics/embedded-content/the-video-element/video-loading-lazy-window-onload.tentative.html
Outdated
Show resolved
Hide resolved
...semantics/embedded-content/the-video-element/video-loading-lazy-window-onload.tentative.html
Outdated
Show resolved
Hide resolved
… event and added a fallback if event never fires.
…t event comes after window load
… scscroll, as the poster image will impact its rendered size and be useful as a proxy for poster lazy loading
|
Thanks for the review.
|
.../semantics/embedded-content/the-video-element/video-loading-autoplay-deferred.tentative.html
Show resolved
Hide resolved
html/semantics/embedded-content/the-video-element/video-loading-eager.tentative.html
Outdated
Show resolved
Hide resolved
html/semantics/embedded-content/the-video-element/video-loading-lazy-to-eager.tentative.html
Outdated
Show resolved
Hide resolved
html/semantics/embedded-content/the-video-element/video-loading-load-deferred.tentative.html
Outdated
Show resolved
Hide resolved
...s/embedded-content/the-video-element/video-loading-load-preload-auto-deferred.tentative.html
Outdated
Show resolved
Hide resolved
html/semantics/embedded-content/the-video-element/video-loading-poster-deferred.tentative.html
Outdated
Show resolved
Hide resolved
html/semantics/embedded-content/the-video-element/video-loading-lazy-to-eager.tentative.html
Outdated
Show resolved
Hide resolved
...ics/embedded-content/the-video-element/video-loading-lazy-poster-when-visible.tentative.html
Outdated
Show resolved
Hide resolved
...ntics/embedded-content/the-video-element/video-loading-lazy-load-when-visible.tentative.html
Outdated
Show resolved
Hide resolved
html/semantics/embedded-content/the-video-element/video-loading-lazy-to-eager.tentative.html
Outdated
Show resolved
Hide resolved
|
@zcorpan thanks for the change notes above. I'll be addressing these today. |
|
As a followup, we're now working on a pass of revisions here to broaden these tests to include audio element support. |
…nts, then append to DOM, to avoid posible race conditions:
…rely on the browser to make it later
…h relevant changes to suit the element.
… need to set the loading element before the src element, just in case the src is fetched immediately when loading is eager
|
Hi all. We've pushed revisions that address @zcorpan's latest round of suggestions as well as add tests for audio element support, closely following the same patterns where relevant. |
…e the dimensions change may vary by UA
…eo loading events as UAs vary on that. Simplify lazy audio test for no window onload delay
|
I made a followup video test revision today after some feedback from the folks working on a Chromium implementation: avoid media loading events for poster as UAs aren't consistent on firing them for that. |
…bs positioning makes tests flaky in chromium's content_shell, and these are simpler and equivalent anyhow
These tests support the proposal for the addition of a loading attribute
on the video and audio elements, designed to enable lazy-loading of resources related to those elements.
Related HTML Standard Proposal: whatwg/html#11980
Related issue: whatwg/html#10376
These are designed to pass in a browser that supports the proposed feature (verified in a locally patched browser).
Co-authored-by: Zach Lysobey zlysobey@squarespace.com
Co-authored-by: Brad Frost bfrost@squarespace.com
Co-authored-by: Credo Duarte cduarte@squarespace.com