YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is obscured by com.google.android.youtube.player.YouTubePlayerView{b5323ed V.E...... ........ 0,0-680,382}. YouTubePlayerView is completely covered, with the distance in px between each edge of the obscuring view and the YouTubePlayerView being: left: 0, top: 0, right: 0, bottom: 0..
I have mentioned the error above that I'm facing when I re-initializing the youtube fragment with new youtube video url.
so far I have used a view above youtube player and make it as hide or visible based on the player state and it's working for first time but when i reload with new youtube url it's fails to play after 2 seconds.
I have posted my layout code blew
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent">
<FrameLayout
android:id="@+id/youtube_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blue"
/>
<ImageView
android:layout_width="@dimen/dimen_size_40dp"
android:layout_height="@dimen/dimen_size_40dp"
android:layout_alignParentEnd="true"
android:scaleType="centerInside"
android:layout_gravity="end"
android:src="@drawable/ic_mode_edit_white_48" />
</RelativeLayout>
Anyone please let me know what I have done it wrong way?