0

I want to play the YouTube video in fullscreen mode by default in my Android application. I have tried with the options force_full screen and flag_full screen, but nothing is working.Can you please help me on this?

Thanks.

Max
  • 4,067
  • 1
  • 18
  • 29
Anu
  • 1
  • 2

2 Answers2

3

This should be work:

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

Thanks DagW

Community
  • 1
  • 1
Ozan
  • 1,191
  • 2
  • 16
  • 31
0

you can use this code, if you use YouTube SDK

player.setPlaybackEventListener(new YouTubePlayer.PlaybackEventListener() {
                    @Override
                    public void onPlaying() {
                        player.setFullscreen(true);
                    }

                    @Override
                    public void onPaused() {

                    }

                    @Override
                    public void onStopped() {

                    }

                    @Override
                    public void onBuffering(boolean b) {

                    }

                    @Override
                    public void onSeekTo(int i) {

                    }
                });