Youtube Player On Android - Endless Download

YoutubePlayer shows endless loading when trying to play songs from YoutubePlayerAPI , in particular, from YouTubePlayerSupportFragment for Android. This happens randomly. Sometimes the download ends with INTERNAL_ERROR . See Attached Images.

Strange - because the native Youtube app is able to load and play video correctly and without any delay.

Please advise what could be causing these problems and how to fix them. thanks in advance

EDIT: I get the onVideoStarted callback, but still the video is not playing

enter image description here enter image description here

+5
source share
2 answers

Take a look at this answer and try making the same YouTubePlayerFragment backstack snippet . I think your problem has the same reason as mine. Also check the logcat output for errors (it can be confusing, and from the application area, so check the "No filters" box in logcat)

+1
source

I don't know if this really answers the questions, but I had a similar problem with endless loading.

Basically, I would like to play the video using a fragment of the player, exit the video, and then the next video that I would try to play will display an infinite download indicator.

This problem has occurred only on some devices.

Since I used the latest version of apt youtube, I updated the youtube application on problem devices and it seems to have solved the problem.

I know that โ€œupdating the YouTube appโ€ is not a great answer, but it fixed the odd problems I was experiencing.

Hope this helps.

0
source

Source: https://habr.com/ru/post/1233138/


All Articles