Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
458 views
in Technique[技术] by (71.8m points)

play youtube video in full screen mode in my android app

I am using the following code to play youtube videos in my app.

startActivity(new Intent(Intent.ACTION_VIEW, 
                         Uri.parse("http://www.youtube.com/watch?v=videoid")));

I would like the youtube videos to open in full screen mode. Is there any way to achieve this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Found this solution today:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.youtube.com/watch?v=VIDEOID"));
intent.putExtra("force_fullscreen",true); 
startActivity(intent);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...