youtube-background icon indicating copy to clipboard operation
youtube-background copied to clipboard

Missing cover video for a second

Open developerabdan opened this issue 5 years ago • 4 comments

hi, currently i used your library video background to embed my videos. I did following the documentations , and i realized there is something wrong with the videos. everytime i reload the page, the cover is missing for a while. here is the screenshot

image

developerabdan avatar May 11 '20 12:05 developerabdan

Hey man, can I get the link of where this is happening so I can take a look? Or at least the video link? Thanks for reporting an issue!

stamat avatar May 14 '20 14:05 stamat

sorry for the late reply. here is the embed links: https://www.youtube.com/watch?v=Mh7byd9J3qo

developerabdan avatar Oct 13 '20 05:10 developerabdan

sorry for the late reply. here is the embed links: https://www.youtube.com/watch?v=Mh7byd9J3qo

I have the same issue with two of lots of video. This issue is from the video cover, if you try with another video with a good cover image it's ok.

sbenahmedNB avatar Nov 04 '20 11:11 sbenahmedNB

Just a little observation! From what I could gather, also having this issue in some of the sites I used the script:

  • Seems this doesn't happen with every video
  • If I understood correctly how the video background image function works, it fetches the "maxresdefault.jpg" size of the video's thumbnail image by default

So the problem appears to be when the video used doesn't have a "maxresdefault.jpg" thumbnail image (for some reason, I'm not sure why), and that default YouTube broken image is used. I figured this once when I did some tests with a embeded video giving me this problem, by copying the background image link being inserted through CSS on the "youtube-background" element and trying to change the path to other thumbnail resolutions to find a valid image... With the help of this answer on Stack Overflow: https://stackoverflow.com/a/2068371. So I ended up with these:

https://img.youtube.com/vi/7gLHLlc64lc/maxresdefault.jpg (default background image being used by the script, broken thumbnail) https://img.youtube.com/vi/7gLHLlc64lc/default.jpg https://img.youtube.com/vi/7gLHLlc64lc/hqdefault.jpg

The other two images (among others) were valid, so I just used CSS to replace the background-image property of the "youtube-background" element and voilá! Turns out the image quality of those thumbnails is bad so I was asked to remove the image background altogether in this particular case, but still I think it was an insteresting thing to note.

I'm not sure if this comment is useful in any way, or if maybe I'm misunderstanding how this function works (sorry if I'm wrong!), but I hope it might help in some way!

(Also sorry if anything sounds confusing, English isn't my first language)

Isa-Love-Anime avatar Aug 03 '21 19:08 Isa-Love-Anime

After three years I'm here to change a single god damn link 😆 Sorry about that folks. It's been resolved in v1.0.19! Cheers 🥂

stamat avatar Oct 26 '23 19:10 stamat