横向模式下YotubePlayerSupportFragment全屏视图

我试图在横向模式下以全屏模式显示YouTube播放器,但它不起作用。 我放

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

但是异常即将到来:

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/70189.html

上一篇: YotubePlayerSupportFragment full screen view in landscape mode

下一篇: Defining TH Lift instances for algebraic data types