aFarkas / lazysizes

High performance and SEO friendly lazy loader for images (responsive and normal), iframes and more, that detects any visibility changes triggered through user interaction, CSS or JavaScript without configuration.
MIT License
17.56k stars 1.73k forks source link

Fix lazy loaded video autoplay #990

Open dmkl opened 1 year ago

dmkl commented 1 year ago

Autoplaying lazy loaded video with the markup suggested by @aFarkas fails with an error https://developer.chrome.com/blog/play-request-was-interrupted/

This fix triggers video loading first and then plays it. It seems to work. I'm not sure if there is more elegant solution to this problem.

Rattone commented 1 year ago

@aFarkas how are you? are you alive?