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

sometimes the player seems to not initialize correctly and buffers indefinitely #851

Closed
LuisKleinwort opened this issue May 12, 2022 · 3 comments

Comments

@LuisKleinwort
Copy link

I use one ore more instances of the player in a Fragment, and after repeatedly opening and closing the section where said Fragment is used, the player buffers forever in some cases.
In my testing I found that when the issue occurs none of the callbacks are called (in this case I'm using getYouTubePlayerWhenReady)

doOnAttach {
  findViewTreeLifecycleOwner()!!.lifecycle.addObserver(youtube_player)
  
  youtube_player.getYouTubePlayerWhenReady(object : YouTubePlayerCallback {
    override fun onYouTubePlayer(youTubePlayer: YouTubePlayer) {
      onItemPresentedAction()
      youTubePlayer.cueVideo(videoId, 0F)
    }
  })
}
@PierfrancescoSoffritti
Copy link
Owner

Hi, probably duplicate of #840 and/or #830

@ChrisKruegerDev
Copy link

Seems to be the same problem. It also happens when the YouTube player is in an Activity.

@PierfrancescoSoffritti
Copy link
Owner

This should be fixed in version 11.1.0.

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

3 participants