Android YouTubePlayer with unauthorized overlay on top of player

后端 未结 8 2012
慢半拍i
慢半拍i 2020-11-29 09:53

I\'m using YouTubePlayer (YouTube api for android) within a Fragment I am inflating a LinearLayout with the YouTube Player, in this way:

fragmentManager = ge         


        
8条回答
  •  暖寄归人
    2020-11-29 10:35

    I had the same error. Although I did the XML changes, I continued to receive the error:

     YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is obscured by android.view.View{59fa6ce V.ED..... ........ 0,0-1440,84 #102002f android:id/statusBarBackground}. The view is inside the YouTubePlayerView, with the distance in px between each edge of the obscuring view and the YouTubePlayerView being: left: 0, top: 0, right: 0, bottom: 2308..
    

    After I set the FULLSCREEN, it worked perfect

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    

    Hope it will help others.

提交回复
热议问题