tylerpearson / lazyYT

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

404 on maxresdefault.jpg, should fallback to next available image #20

Open jaskaran27 opened 9 years ago

jaskaran27 commented 9 years ago

I am getting 404s for a couple of video thumbnails. If maxresdefault.jpg is not available, it should use sddefault.jpg. If that is not available, it should fallback to the next available thumbnail image and so on.

tmtmtm commented 9 years ago

there is no easy way to reliably determine the availability of maxresdefault.jpg, try this workaround: https://github.com/tmtmtm/lazyYT/commit/a2f0b8decc34dad8152dc4afb7d284ea805724d0 still, its not 100% reliable.

tmtmtm commented 9 years ago

update - please test: https://github.com/tmtmtm/lazyYT/commit/59a2b3e7f4b939382dbefa6906baecb4052e09d7

jaskaran27 commented 9 years ago

I tested this out, but I still get 404s for sddefault.jpg. I guess those videos are not HD. If sddefault.jpg is not available, it should be getting hqdefault.jpg.

tyrann0us commented 9 years ago

+1

tmtmtm commented 9 years ago

made some fixes, please update. if this does not solve the issue, then more complex checking of youtube data will be needed.

jaskaran27 commented 9 years ago

I tried it out, still getting 404s for sddefault.jpg.

tmtmtm commented 9 years ago

please provide id/url of failing videos

jaskaran27 commented 9 years ago

Here are a couple of them

CBsVRqaJJA4 (480p) MgWc3cc_vII (360p) CvEs5Dqwul8 (240p)

tyrann0us commented 9 years ago

any news?

Daugilas commented 8 years ago

Solved with commit: https://github.com/Daugilas/lazyYT/commit/a7f02270d2c1d0e20916fb44489d4d095c78b373

On this fork: https://github.com/Daugilas/lazyYT/