YotubePlayerSupportFragment full screen view in landscape mode

I am trying to show youtube player in fullscreen in landscape mode but it is not working. I put

player.setFullscreenControlFlags(YouTubePlayer.FULLSCREEN_FLAG_CONTROL_ORIENTATION);
player.setFullscreenControlFlags(YouTubePlayer.FULLSCREEN_FLAG_ALWAYS_FULLSCREEN_IN_LANDSCAPE); 

But exception is coming :

java.lang.IllegalArgumentException: Can not set FULLSCREEN_FLAG_FULLSCREEN_WHEN_DEVICE_LANDSCAPE without setting FULLSCREEN_FLAG_CONTROL_ORIENTATION
03-21 16:10:09.892: E/AndroidRuntime(15996):    at com.google.android.youtube.player.internal.r$a.handleMessage(Unknown Source)

setFullscreenControlFlags的flags参数是一个位掩码,因此您应该对所有您需要的标志进行按位或运算,并使用setFullscreenControlFlags而不是使用多个调用来设置它们。

链接地址: http://www.djcxy.com/p/70190.html

上一篇: 不能通过添加ssh来克隆克隆

下一篇: 横向模式下YotubePlayerSupportFragment全屏视图