我正尝试在SlidingDrawer视图中放置一个YouTubePlayerSupportFragment。然而,当它运行时,视频在1秒后停止,并在LogCat中发布以下内容:
W/YouTubeAndroidPlayerAPI(1778): YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is obscured by ViewName{41726520 V.E..... ........ 0,0-720,1038 #7f060040 app:id/drawer}. YouTubePlayerView is completely covered, with the distance in px between each edge of the obscuring view and the YouTubePlayerView being: left: 0, top: 241, right: 0, bottom: 392..SlidingDrawer将打开,视频完全可见,不会变暗。有没有人知道解决这个问题的办法?
谢谢
发布于 2013-03-26 19:57:38
我遇到了同样的问题,我改变了YouTubePlayerSupportFragment的边距,在它工作之前,距离是负的。虽然不确定为什么会发生这种情况。
发布于 2015-09-23 23:36:41
从ducumentation youtube播放器应该是最顶层的元素,并有200*110DP的最小尺寸。如果是较小的-播放器将停止。如果任何视图(甚至是不可见的)与youtube播放器重叠,播放器将停止播放
https://stackoverflow.com/questions/14181454
复制相似问题