With the new youtube api
for android, when trying to start an activity with the YouTubeStandalonePlayer it displays the video on landscape mode.
Intent youtubeIntent = YouTubeStandalonePlayer.createVideoIntent(context, Configuration.DEVELOPER_KEY, item.getVideo().getId(), 0, true,false);
context.startActivity(youtubeIntent);
I want the video still to be displayed on full screen but with portrait mode.
Thankfully, there's a better way, using the app's built-in gestures: you can simply swipe up on a video to fill up the screen and swipe down on it to go back to portrait orientation.
A YouTubePlayer provides methods for loading, playing and controlling YouTube video playback.
You could try setting the lightboxMode
parameter (the last boolean) to true. It won't be fullscreen then, but I think it might stay in portrait mode at least (I think, haven't tried it though...).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With