tylerpearson / lazyYT

A jQuery plugin to lazy load those dang Youtube iframe videos.
Other
208 stars 86 forks source link

Unlisted videos result in YT deleted/private images #49

Open adamjcsmith opened 8 years ago

adamjcsmith commented 8 years ago

If a video is unlisted (as opposed to private, as per the YouTube privacy settings) its lazy image results in the default one by YouTube where no preview image is available - e.g. it appears deleted or retrospectively made private.

Is this a bug or is it intentional?

Daugilas commented 8 years ago

It's probably a bug, could you give me a link/YouTube id to such video so I could try it out?

adamjcsmith commented 8 years ago

Sure thing; https://www.youtube.com/watch?v=ZAZqAw84-OI

Daugilas commented 8 years ago

@adamjcsmith thanks for using the plug in. Pardon me for not getting back to you earlier.

Actually I didn't find the issue before with your video and its thumbnail. Now I found it: it doesn't load proper image for bigger size video container. Because it does not have http://img.youtube.com/vi/ZAZqAw84-OI/maxresdefault.jpg for some reason. To solve this I have implemented image validation, so if it does not have the right size it falls down to lower resolution and eventually loads an image!

Get it on my fork: https://github.com/Daugilas/lazyYT

Daugilas commented 8 years ago

P.S. Your video example: http://works.daugilas.com/lazyYT/demo/tmp/fluid_ferrari.html