Intent android youtube player app in full-screen mode

感情迁移 提交于 2019-12-24 01:57:24

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/7306396/intent-android-youtube-player-app-in-full-screen-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!