I am using Youtube API for android app and I'm looking for a way to avoid exiting full-screen mode while switching between landscape modes. Meaning, I don't want to exit full-screen mode while switching the phone to portrait mode. I need the video to always be on full-screen.
Is there a way to make it happen?
My current code for full screen is:
@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider,
YouTubePlayer player, boolean wasRestored) {
if (!wasRestored) {
Intent intent = getIntent();
String Video_Link = intent.getStringExtra("youtube_id");
player.cueVideo(Video_Link);
player.setFullscreen(true);
}
}
Thanks a lot in advance.