ViewPagerAdapter: a reprodução do vídeo do YouTube foi interrompida devido a sobreposição não autorizada na parte superior do player

Fazendo esta pergunta porque não encontrei solução / sugestões após pesquisar por horas. Todas as soluções respondidas estão com o Fragment. O que estou procurando ViewPagerAdapter e FrameLayout.

My ViewPagerAdapter xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<LinearLayout
    android:id="@+id/promotion_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <ImageView
        android:id="@+id/some_image"
        android:layout_width="match_parent"
        android:layout_height="@dimen/view_pager_height"
        android:scaleType="fitXY" />

    <FrameLayout
        android:id="@+id/youtube_fragment"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
          />

</LinearLayout>

//Some other view items
</RelativeLayout>

Meu código Java do ViewPagerAdapter:

public class ArticleViewPagerAdapter extends PagerAdapter {

    public String TAG = ArticleViewPagerAdapter.class.getSimpleName();
    private ArrayList<Article> mArticleList = new ArrayList<>();
    private Activity mContext;
    private LayoutInflater mLayoutInflater;
    private FragmentManager mFragmentManger;
    private YouTubePlayerListener mYouTubePlayerListener;



    public ArticleViewPagerAdapter(Activity context, ArrayList<Article> articleList, FragmentManager fragmentManager, YouTubePlayerListener youTubePlayerListener) {
        this.mContext = context;
        this.mArticleList = articleList;

        this.mFragmentManger = fragmentManager;
        this.mYouTubePlayerListener = youTubePlayerListener;
        mLayoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    }

    @Override
    public int getCount() {
        return mArticleList.size();
    }

    @Override
    public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
        return view == (object);
    }

    @NonNull
    @Override
    public Object instantiateItem(@NonNull ViewGroup container, int position) {
        View itemView = mLayoutInflater.inflate(R.layout.activity_news, container,
                false);
        itemView.setTag(position);
        updateView(itemView, position);
        ((ViewPager) container).addView(itemView);
        return itemView;
    }


    @Override
    public void destroyItem(ViewGroup container, int position, Object object) {
        container.removeView((View) object);
    }

    private void updateView(View itemView, int position) {

        final int index = position;
        final View finalView = itemView;

        //Initializing the view items
        final ImageView mNewsImage = itemView.findViewById(R.id.some_image);
        final FrameLayout mYoutubeFragment = itemView.findViewById(R.id.youtube_fragment);
        //Let's Test using this
        final YouTubePlayerSupportFragment youTubePlayerFragment = YouTubePlayerSupportFragment.newInstance();

        ResArticle articleResponse = response.body();  //Got response from API
        if (articleResponse != null && articleResponse.getData() != null) {
            final Article article = articleResponse.getData();
            final String pageUrl = SHARE_BASE_URL + article.getArticleId();
            if (article != null) {


                if (article.getArticleType()==Constants.ARTICLE_TYPE_NEWS) {
                     //Basically setting visibility But you can ignore this part
                    mNewsImage.setVisibility(View.VISIBLE);
                    mYoutubeFragment.setVisibility(View.GONE);


                }

                if(article.getArticleType()==Constants.ARTICLE_TYPE_VIDEO) {
                    Log.d(TAG,"Article Type is Video");
                    mYoutubeFragment.setVisibility(View.VISIBLE);
                    mNewsImage.setVisibility(View.GONE);


                    youTubePlayerFragment.initialize(mContext.getString(R.string.web_client_id), new YouTubePlayer.OnInitializedListener() {
                        @Override
                        public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean wasRestored) {

                            youTubePlayer.setShowFullscreenButton(false);
                            youTubePlayer.cueVideo("video_id");
                            if (mYouTubePlayerListener!=null)
                                mYouTubePlayerListener.setYouTubePlayer(youTubePlayer);

                        }

                        @Override
                        public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) {
                            Log.e(TAG, "Youtube Video initialization failed");
                        }
                    });
                    FragmentTransaction transaction = mFragmentManger.beginTransaction();
                    transaction.replace(R.id.youtube_fragment, youTubePlayerFragment).commit();
                }

            }
        } else {
            Toast.makeText(mContext, mContext.getString(R.string.article_info_not_found), Toast.LENGTH_SHORT).show();
            Log.e(TAG, "Article info not found");
        }


        }

    }

}

E eu estou chamando o adaptador da Atividade NÃO doYouTubeBaseActivity.

Problema: A reprodução do vídeo do YouTube foi interrompida devido a sobreposição não autorizada na parte superior do player. O YouTubePlayerView não está contido em seu ancestral android.widget.FrameLayout As distâncias entre as bordas do ancestral e as do YouTubePlayerView são: esquerda: 0, superior: 0, direita: 0, inferior: 0 (todas devem ser positivas).

Por que estou recebendo o erro? Enquanto carrego vários reprodutores do YouTube usando o ViewPager. Como sabemos, o viewpager carrega o item seguinte, anterior e atual. Assim, o vídeo atual do YouTube é inicializado e o próximo. Porém, como o YouTubePlayer atual se sobrepõe ao próximo (pré-carregado).

Por favor ajude. Ou devo usar qualquer biblioteca para carregar vídeos do YouTube.

questionAnswers(1)

yourAnswerToTheQuestion