开发者

Intent android youtube player app in full-screen mode

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜