Lazy Loading Video
TomS- opened this issue · 3 comments
Hello,
I noticed that LazyLoad XT hasn't updated in 3 months and I was having an issue with it not lazy loading on Mac OSX Safari.
In this current build it's very important to lazy load videos:
<video class="b-lazy" width="100%" height="100%" autoplay loop muted data-poster="<?=$layout->featured_project_video_placeholder_poster->url?>"> <source class="b-lazy" data-src="<?=$layout->featured_project_video_placeholder_mp4->url?>" type="video/mp4"> <source class="b-lazy" data-src="<?=$layout->featured_project_video_placeholder_webm->url?>" type="video/webm"> <source class="b-lazy" data-src="<?=$layout->featured_project_video_placeholder_ogg->url?>" type="video/ogg"> </video>
I've tried the above but it didn't work. Is there any plan to support this?
Hey @TomS-
On my example page where it works I only have a data-src on my video tag and no source tags. But it should work. I'll see if I get time later today or tomorrow to test it.
In your code you should a least remove the b-lazy class from the video tag.
hey @TomS-
Better late than never ;)
See example 5b at my examples page: http://dinbror.dk/blazy/examples/
Fixed in 1.6.0