YotubePlayerSupportFragment full screen view in landscape mode

android, youtube-api

Solution

The flags parameter to `setFullscreenControlFlags` is a bitmask, so you should do a bitwise OR of all the flags you want and set them with a single call to `setFullscreenControlFlags` instead of using multiple calls.

Problem

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) ```

Original source