YouTube video playback stopped due to unauthorized overlay on top of player.getting error : I have trouble using the YouTubePlayerSupportFragment inside a (Support)ViewPager. Everything works fine except when i come resume method youtube player playing few seconds, and then it will be paused. 
 getting error ..

 

My Layout..

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout ..>
      

       ..

                <FrameLayout
                    android:id="@+id/youtube_layout"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="1" />

                <android.support.v4.widget.SwipeRefreshLayout
                    android:id="@+id/swipeRefreshLayout"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="1" >

                    <android.support.v7.widget.RecyclerView
                        android:id="@+id/recyclerCardList"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:divider="@color/colorPrimaryDark"
                        android:dividerHeight="8dp"
                        android:scrollbars="vertical" />
                </android.support.v4.widget.SwipeRefreshLayout>
            </LinearLayout>
          
</LinearLayout>




My Code :

	private void setYoutubePlayer() {

		YouTubePlayerSupportFragment youTubePlayerFragment = YouTubePlayerSupportFragment.newInstance();

		FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
		transaction.add(R.id.youtube_layout, youTubePlayerFragment)
				.addToBackStack(youTubePlayerFragment.getClass().getName()).commitAllowingStateLoss();

		youTubePlayerFragment.initialize(Config.DEVELOPER_KEY, new OnInitializedListener() {

			@Override
			public void onInitializationSuccess(Provider provider, YouTubePlayer player, boolean wasRestored) {
				if (!wasRestored) {
					player.setPlayerStyle(YouTubePlayer.PlayerStyle.DEFAULT);

					player.loadVideo(Config.YOUTUBE_VIDEO_CODE);
					player.play();

				}

			}

			@Override
			public void onInitializationFailure(Provider provider, YouTubeInitializationResult error) {
				// YouTube error
				String errorMessage = error.toString();
				Toast.makeText(getActivity(), errorMessage, Toast.LENGTH_LONG).show();
				Log.d("errorMessage:", errorMessage);
			}
		});
	}


Kindly help me as soon as possible.
 