Reputation: 1
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.
Upvotes: 0
Views: 2412
Reputation: 101
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) {
}
});
Upvotes: 0