Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube Player on Android - endless loading

YoutubePlayer shows endless loading when try to play a song with YoutubePlayerAPI in particular with YouTubePlayerSupportFragment for Android. It happens randomly. Sometimes the loading fails with INTERNAL_ERROR. Please see attached images

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

Please advise what might be the reason of such issues and how to fix them. Thanks in advance

EDIT: I do receive onVideoStarted callback, but still video doesn't play

enter image description here enter image description here

like image 865
Taras Avatar asked Nov 09 '22 03:11

Taras


1 Answers

See this answer and try to do the same YouTubePlayerFragment backstack. I think your problem has same cause as mine. Also check logcat output for errors (it could be obfuscated, and out of application scope, so check 'No filters' in logcat)

like image 52
Kolchuga Avatar answered Nov 15 '22 12:11

Kolchuga