Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top