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

On reloading my page ReactPlayer doesn;t work. #88

Closed
iamjamielobo opened this issue Jul 28, 2016 · 3 comments
Closed

On reloading my page ReactPlayer doesn;t work. #88

iamjamielobo opened this issue Jul 28, 2016 · 3 comments

Comments

@iamjamielobo
Copy link

On reloading my page ReactPlayer doesn;t work. It gives the following error.

YT.Player is not a constructor

@cookpete
Copy link
Owner

@iamjamielobo What OS and browser are you using? Do you have more steps to reproduce this? Or an example repo?

@iamjamielobo
Copy link
Author

It;s happening on all browsers.

It happens rarely when you reload the page.

I've implemented it here.

https://in.bookmyshow.com/mumbai/videos/trailers/dunkirk/ET00044852

@cookpete
Copy link
Owner

cookpete commented Aug 9, 2016

Ok I think I know what's going on. If you have several different things loading the youtube iframe API at once, the global YT object can sometimes be {loading: 1, loaded: 0} with no Player yet. When this happens, the getSDK promise is resolved with this object here and the whole thing breaks. Should be a simple fix just to ensure that loaded is 1 as well before resolving the array.

david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue Dec 23, 2018
david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue May 23, 2020
albanqoku added a commit to albanqoku/react-player that referenced this issue Feb 24, 2021
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
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

2 participants