-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
YouTubePlayer onReady() not called on second Activity #846
Comments
Hi, could be related to #830 ? |
Not really, because I got the issue even when player in FirstActivity is loaded and then wait 2-3 seconds before navigate to other screen |
For me it looks like the state of firstly created player have impact on every other created YouTubePlayer. For example when I make SecondActivity as my initial Activity, the player is loaded correctly. Also I made test where in my first Activity I created multiple instances of YouTubePlayer and all of them loaded correctly, but when I switched to another Activity the player in that another Activity also does not called onReady() method. |
I think I'm experiencing the same issue. The firstly created player always works, instances after that have a chance of not working. The ones that do not work are either in a new Fragment or another Activity. |
This should be fixed in version 11.1.0. |
android-youtube-player: version 11.0.1
jetpack-compose
tested on: Android API 27 and API 29
I created new Empty Compose Activity in Android Studio and initialized YouTubePlayer in my
FirstActivity
like this:and here everything is fine, YouTubePlayer is initialized, video is loaded and
onReady()
method is called. When I click full screen button which redirect us toSecondActivity
the methodonReady()
from YouTubePlayer inSecondActivity
is not called. This is howSecondActivity
looks like:Strange thing is that when I play video in
FirstActivity
and then openSecondActivity
, most of the time everything is fine, YouTubePlayer inSecondActivity
is loaded correctly and we can play video. But when I'm inFirstActivity
and do NOT hit "play" button, but try to openSecondActivity
, theonReady()
method from YouTubePlayer inSecondActivity
is almost never called.The text was updated successfully, but these errors were encountered: