-
Notifications
You must be signed in to change notification settings - Fork 141
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
Make Video Poster Attribute Lazy? #32
Comments
i was literally just about to open an issue like this :) just add [1] https://github.com/malchata/yall.js/blob/master/src/yall.js#L117 |
Poster is now lazy. Thanks. |
A video's Feel free to fork this and modify it for your own purposes, but it's not a feature I intend to add to this script, which I'm already seeking to finalize and advise of deprecation (per #29) in favor of native lazy loading which is already available as a feature behind a flag in Chrome. |
i don't understand this reasoning, except for the narrowest/purist interpretation. functionally, it is loaded as an image. if you have a video gallery below the fold, you could be loading 10 posters which can add to 1mb or more. it [semantically] being a placeholder is quite irrelevant.
seems very premature. we still see 6℅ IE11 traffic (US, ecommerce, home remodeling industry). desktop and iOS safari still lack IntersectionObserver support. it will be years before it's widely available. if you no longer want to maintain yall, that's perfectly fine but just call a spade a spade. anyways, thanks for the lib! |
First, I want to apologize for being flippant. I didn't think I was being so as I wrote my reply, but if that is how my response was taken, my intentions are irrelevant, and I own that. That said, my concerns for this feature request are as follows:
I'll reopen this and take a stab at it (along with some other issues that have piled up), but I can't guarantee anything. In the short term, I would advocate serving lossy low quality placeholders (<q50) to mitigate how much is being sent down the wire. And again, I apologize. I didn't intend to be flippant, but it came off that way, and that's what really matters. |
No need to apologize. I was just baffled by the drive-by "no one needs this, native lazyload is just around the corner" & let's talk a bit more about autoplay is widely considered a shit UX anti-pattern for the same reasons you'd want to lazy-load anything - it sucks bandwidth and distracts from static content. google, apple and others have been preaching against it for a long time. IMO autoplay is only acceptable in 2 cases. 1) the user came to the page to watch the video (news channel, youtube, netflix) or 2) the user clicked on something to cause a modal and you need to load the video dynamically in there and start playing it. in these causes, there is no need to lazy-load anything (neither the poster nor the content). for videos that don't auto-play, we already have
the current default behavior of lazy-loading video content caters more to below-the-fold autoplaying videos (a huge anti-pattern) that can already be done with
because of the above reasoning, i don't think this combination makes sense to support. it's unfortunate that yall caters to lazy-loading video content which has been possible for a while [1] (except IE, i guess). i would much rather have the posters be lazy-loaded with no special handling for the content. /$0.02 |
you could actually instead toggle "data-preload" and "data-poster" at the |
thanks @malchata! |
What to do when video poster attribute used?
Poster image is not lazy loaded.
How about data-poster included?
The text was updated successfully, but these errors were encountered: