dinbror / blazy

Hey, be lazy! bLazy.JS is a lightweight pure JavaScript script for lazy loading and multi-serving images. It's working in all modern browsers including IE7+.
http://dinbror.dk/blazy
MIT License
2.63k stars 354 forks source link

Lazy Loading Video #81

Closed TomS- closed 8 years ago

TomS- commented 8 years ago

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: `

<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">

`

I've tried the above but it didn't work. Is there any plan to support this?

dinbror commented 8 years ago

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.

dinbror commented 8 years ago

hey @TomS-

Better late than never ;) See example 5b at my examples page: http://dinbror.dk/blazy/examples/

dinbror commented 8 years ago

Fixed in 1.6.0