-
-
Notifications
You must be signed in to change notification settings - Fork 761
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
Add callback for Init Failure #248
Comments
Hi, unfortunately it's not possible. There is no way of knowing if the iframe library download has failed. YouTubePlayerView contains logic to handle connectivity problems, you can look there to see how it works! (look for the If you're finding this library to be useful consider leaving a star on Github :) |
(Already starred 😄 ) Thanks for the quick reply, I found that on iOS youtube sdk, they used onerror of <script> tag to detect the script load failure (code). And it works fine in iOS and chrome on a Mac. Is it possible we use the same mechanism on Android platform? |
Oh yeah, good idea. Yes, that should work! |
Any Update to callback for Init Failure???? |
Hi, @always-beta suggestion has yet to be implemented in the library. |
Hey @always-beta, can I ask for what use case would you need the init failure callback? At the moment the library automatically resolves init failures. |
Hey, the use case would be like: our users are from all over the world including China where youtube can't be visited, and the iframe couldn't be loaded forever, in that case I'd like to notify users in time other than give no feedback to user. |
I see, that makes sense. I can try to do it over the weekend, but I can't guarantee I will have time. If you want, feel free to send a pull request! |
Hi, thanks for the great library!
In YouTubePlayerInitListener, there is onInitSuccess callback which will be called after the iframe script from youtube being loaded, is there anyway I can detect the init fails due to the iframe script couldn't be loaded (maybe network issue)?
Seems like I can implement a timer to trigger after certain timeout but I'm wondering if there is a better and correct way of receiving the event.
Thanks.
The text was updated successfully, but these errors were encountered: