开发者

Intent android youtube player app in full-screen mode

开发者 https://www.devze.com 2023-04-03 05:07 出处:网络
Cou开发者_JAVA百科ld 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

Cou开发者_JAVA百科ld 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. ?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号