问题描述
例如这部影片无法与YouTube播放器API出场: https://www.youtube.com/watch ?V = OLK1efdt3n8 (从搜索响应其他视频作品确定)
For example this video can't be played with Youtube player API : https://www.youtube.com/watch?v=OLK1efdt3n8 (other videos from search response works ok)
我得到以下信息:
09-25 17:18:50.226 24280-24280/com.mypackagename W/YouTubeAndroidPlayerAPI﹕ Cannot load modern controls UI. Upgrade to the latest version of the Android YouTube API.
09-25 17:19:05.911 24280-24280/com.mypackagename E/YoutubePlayerFragment﹕ video error : INTERNAL_ERROR
YouTubePlayer API版本:1.2.1(最新)
YouTubePlayer API version : 1.2.1 (latest)
在设备上YouTube应用程序是最新的,并能播放该视频
YouTube app on device is up to date and able to play this video
视频参数: videoEmbeddable =真videoSyndicated =真
推荐答案
有关我的问题是,我能够播放视频只有一次,但在那之后YouTubePlayer不能播放任何视频,我希望还有的谁也面临着与YouTubeAndroidPlayerAPI类似的问题。我觉得最新的YouTube应用程序(10.37.58版)和YouTubeAndroidPlayerAPI 1.2.1不兼容。
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.
要尽我所知的你唯一可以做的当前解决这个问题是降级您的YouTube应用程序安装到设备到10.36.52或低于上。(你可以从 APK镜得到它)
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)
从我已经注意到,同时与YouTubeAndroidPlayerAPI工作是与YouTube版本10.36.52它抛出警告信息的无法加载现代控制用户界面,升级到Android的YouTube API的最新版本。的在logcat的每次我尝试播放视频,但另有正常工作。而随着10.35.53版及以下没有这样的警告信息被抛出。
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.
原因:我不知道,但我觉得这是与庞大的内存泄漏问题与YoutubePlayerSupport片段YouTubeAndroidPlayerAPI 1.2.1这是广为人知,并在报道的。上个月终于被固定在9月1日一年之后(至少这就是目前的状况说),因为据报道(惊讶地看到了谷歌这么久)。但谷歌还没有推出YouTubeAndroidPlayerAPI与修复新版本呢。所以也许它们固定在YouTube应用程序的内存问题在九月其中一些如何打破YouTubeAndroidPlayerAPI 1.2.1的功能在某些方面(因为YouTubeAndroidPlayerAPI直接依赖于YouTube应用工作)。
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).
这篇关于无法播放使用YouTube的Android播放器API的一些YouTube视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!