How to force a video to play in fullscreen in youtube player?

耗尽温柔 提交于 2020-01-10 04:53:25

问题


I have an app where the help section has a tutorial video I want to force this video to open in Fullscreen using the Youtube player (Just like the Market/Play app does). it forces videos to play in Fullscreen even if it's a portrait video.

I use this code to force the video to open in youtube player

String videoId = "VIDEO_ID_HERE";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:"+videoId)); 
intent.putExtra("VIDEO_ID", videoId); 
startActivity(intent);

回答1:


Youtube v4.1.47 app cando it for you

intent.putExtra("force_fullscreen",true); 

I dont know about lower versions.



来源:https://stackoverflow.com/questions/14064244/how-to-force-a-video-to-play-in-fullscreen-in-youtube-player

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