ressio / lazy-load-xt

Lazy load XT is a jQuery plugin for images, videos and other media
http://ress.io/lazy-load-xt-jquery/
MIT License
1.36k stars 245 forks source link

Disable lazyload for certain video #68

Open ghost opened 8 years ago

ghost commented 8 years ago

Hi,

I have come across an issue when you want to use lazy load.extra and you have a video on your page but do not want to use lazy load for the video.

The result is 404 (Not found) error of /undefined.

The cause is found in the selector for the video: 319: options.selector += ',video,iframe[data-src]';

Since the instructions for the use of the video lazy loading state that you should use data-src instead of src, the issue should be fixed by changing this rule in to:

319: options.selector += ',video[data-src],iframe[data-src]';

But now you got an issue when you want to use:

A correct fix would be nice. Thanks