Reputation: 31
Could we make an intent for youtube player app in portrait(full-screen-horizontal) mode. I want "my android app users" to open youtube video in full screen? How can I prevent my users from seeing the youtube videos' details, comments, view number, etc by letting them only the portrait view(full screen)? Even if they use the android phone vertically, how can I let them only horizontal-full screen view of youtube player thereby forcing them to turn their phone. ?
Upvotes: 3
Views: 2872
Reputation: 1628
As for YouTube v4.1.47, you can do the following:
Intent playIntent = new Intent(Intent.ACTION_VIEW);
playIntent.setData(Uri.parse(<yout_YouTube_url>));
playIntent.putExtra("force_fullscreen", true);
It might work on older versions, but I haven't tested it.
Upvotes: 2