Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When light prop is set to true for multiple YouTube videos some of the thumbnail images are not loaded #1130

Closed
pedramp20 opened this issue Jan 12, 2021 · 8 comments

Comments

@pedramp20
Copy link

Current Behavior

There is a grid of 3x3 react players with their urls pointing to some YouTube videos. The "light" prop is set to true for all of them and they are all dynamically added to the their parent in a map, so everything is identical in all of them beside the url. but some the videos' thumbnail images are not loaded (the same videos). The videos load just fine on click.

Expected Behavior

All the thumbnail images to be loaded on start

@pedramp20 pedramp20 changed the title When light prop is set to true for multiple YouTube video some of the thumbnail images are not loaded When light prop is set to true for multiple YouTube videos some of the thumbnail images are not loaded Jan 12, 2021
@pedramp20
Copy link
Author

Anyone? Any ideas?

@faran4engg
Copy link

Anyone? Any ideas?

I am also facing the same issue !

@flobby
Copy link

flobby commented Jan 13, 2021

I can confirm this

@Freeride91
Copy link

Same at me!

@cookpete
Copy link
Owner

I’m using noembed to show a thumbnail before loading the player. They have a demo page here: https://noembed.com/demo

Feel free to try the URLs that are failing and see what happens. Some youtube videos return a 403 Forbidden so that might be what’s happening here.

Or check the URL yourself, eg https://noembed.com/embed?url=https://www.youtube.com/watch?v=tRFOjLIl7G0

@AndriusCv
Copy link

Same here. Videos that get 403 returned from noembed don't have their thumbnails showing.

@ChrisB9
Copy link

ChrisB9 commented Jan 15, 2021

Same for me.
Interestingly though is, that it does happen with different videos at different times (or the same video list accessed locally or on a server).

It is also being reported on their github repo: leedo/noembed#115

My solution to not having an image anymore is to set light: https://i.ytimg.com/vi/{youtubeID}/hqdefault.jpg. That way I do not rely on the noembed-3rd-party anymore

@cookpete
Copy link
Owner

I'll close this off unless anyone can suggest an alternative to noembed for easily getting a thumbnail for any given URL (not just youtube). @ChrisB9's solution is solid if you are using youtube and have the ID handy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants