Hacker News new | ask | show | jobs
by leeoniya 3475 days ago
yes, you can lazy-load the youtube player, there's also a jquery plugin for it [1]. but this setup requires 2 clicks to play on mobile (because google restricts the player from autoplaying onload in mobile devices due to bandwidth/data-usage concerns). the first click will appear to do nothing as it loads the 1.22MB player, so delivers a crap experience.

you're much better off just serving an html5 <video> tag. you can likely fit your entire video in mobile quality in that 1.22MB :D

[1] https://github.com/tylerpearson/lazyYT

2 comments

I'd still prefer a video link, and leave it to my client to negotiate. I have never enjoyed viewing embedded videos in web pages (content aside).
It's an issue with a poor UI design, not lazy-loading though.