Unable to play some Youtube videos using YouTube Android Player API

For me the issue is that I am able to play the video only once but after that YouTubePlayer doesn't play any video and I hope there are many other people who are also facing similar issues with the YouTubeAndroidPlayerAPI. I think the latest youtube app (version 10.37.58) and YouTubeAndroidPlayerAPI 1.2.1 are not compatible.

To best of my knowledge the only thing you can do currently to solve this problem is downgrade your youtube app installed on the device to 10.36.52 or below. (you can get it from apk mirror)

From what I have noticed while working with YouTubeAndroidPlayerAPI is that with the youtube version 10.36.52 it throws warning messages "Cannot load modern controls UI. Upgrade to the latest version of the Android YouTube API." on the logcat everytime I try to play a video but otherwise works fine. And with version 10.35.53 and below no such warning message is thrown.

Reason: I am not sure but I think this has something to do with the huge memory leak issue with the YoutubePlayerSupport fragment in YouTubeAndroidPlayerAPI 1.2.1 which was widely known and reported in google data api issue tracker. It was finally fixed last month on 1st September (at least that's what the current status says) after a year since it was reported (surprised to see what took google so long). However google hasn't rolled out the new version of YouTubeAndroidPlayerAPI with the fix yet. So maybe they fixed that memory issue in the youtube app in September which some how broke the functionality of YouTubeAndroidPlayerAPI 1.2.1 in some way (since YouTubeAndroidPlayerAPI directly depends on the youtube app to work).


Version 1.2.2 of the YouTube Player APIs has just been released. It might address the video playback issue that you are experiencing.