justinribeiro / lite-youtube

The fastest little YouTube web component on this side of the internet. The shadow dom web component version of Paul's lite-youtube-embed.

Home Page:https://www.npmjs.com/package/@justinribeiro/lite-youtube

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jpeg fallback not used when webp is missing

timkinali opened this issue · comments

When the webp image is missing for a video, youtube serves their own fallback image in it's place. So, the webp-image is never really missing from the browsers point of view, which means that the JPG fallback is never used.

In my project this happens with quite a lot of videos. Any custom workarounds I could do to fix it? Perhaps there could be an option to disable webp?

Example, videoid FqpiXeG1eJg :

https://i.ytimg.com/vi_webp/FqpiXeG1eJg/hqdefault.webp // renders youtubes fallback image
https://i.ytimg.com/vi/FqpiXeG1eJg/hqdefault.jpg // renders the correct image, but is never used

Hummmm interesting, I haven't seen this case outside of the lag of video processing. I think I can determine this and flip it, let me take a swing at it.

I’m seeing this on my end as well, FYI.

@justinribeiro have you found a fix for this issue? I'm running through the same problem as well.

I was curious if it's possible to nudge YouTube to generate the webp format for videos. No luck yet, but I did find someone asking about this on StackOverflow. Something to keep an eye on. For my own implementation of this, I'm currently considering rolling back to the JPEGs… :/