coder_baba
coder_baba

Reputation: 402

YouTube Video Stop at every 2 Seconds

HI I am Using THIA LIBRARY TO GET ANIMATION LIKE FLIPBOARD APPLICATION

When I flip one view, I am calling another view which contains a huge Data including YouTube Video and I am inflating all these into RecyclerView. Things are working fine but When I am playing YouTube Video , My video getting pause after every 1-2 seconds with this Message in my 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..

Upvotes: 3

Views: 1594

Answers (1)

abielita
abielita

Reputation: 13469

You may follow this related SO thread. Try removing the padding in the YouTubePlayerView in the layout.

<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 don't allow any view overlay it. Just using setVisibility(View.GONE) for all view overlay it. [Source.]

Upvotes: 2

Related Questions