gpt4 book ai didi

android - YouTube 视频每 2 秒停止一次

转载 作者:行者123 更新时间:2023-11-29 01:13:53 25 4
gpt4 key购买 nike

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

当我翻转一个 View 时,我正在调用另一个 View ,其中包含大量数据,包括 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..

最佳答案

你可以关注这个相关的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 Player 不允许任何 View 覆盖它。只需对所有 View 使用 setVisibility(View.GONE) 覆盖它。 [Source.]

关于android - YouTube 视频每 2 秒停止一次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41117243/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com