【问题标题】:YouTube Video Stop at every 2 SecondsYouTube 视频每 2 秒停止一次
【发布时间】:2016-12-13 09:12:31
【问题描述】:

您好,我正在使用THIA LIBRARY TO GET ANIMATION LIKE FLIPBOARD APPLICATION

当我翻转一个视图时,我正在调用另一个视图,其中包含大量数据,包括 YouTube 视频,我将所有这些数据膨胀到 RecyclerView 中。一切正常,但是当我播放 YouTube 视频时,我的视频每隔 1-2 秒就会暂停一次,并在我的 LogCat 中显示此消息。

YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is obscured by android.opengl.GLSurfaceView{41ced230 V.E..... ......I. 0,0-720,1230}. YouTubePlayerView is completely covered, with the distance in px between each edge of the obscuring view and the YouTubePlayerView being: left: 20, top: 628, right: 63, bottom: 244..

【问题讨论】:

    标签: android youtube-api android-youtube-api


    【解决方案1】:

    你可以关注这个相关的SO thread。尝试删除布局中YouTubePlayerView 中的填充。

    <com.google.android.youtube.player.YouTubePlayerView
        android:id="@+id/video_player"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#000" />
    

    Youtube 播放器不允许任何视图覆盖它。只需使用 setVisibility(View.GONE) 为所有视图覆盖它。 [Source.]

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-16
      • 1970-01-01
      • 2011-10-04
      • 2012-05-08
      • 1970-01-01
      • 2016-06-21
      • 1970-01-01
      • 2023-03-16
      相关资源
      最近更新 更多