Add option to directly open fullscreen when the main player starts

This commit is contained in:
Stypox 2021-01-19 08:13:44 +01:00
parent faa7a91764
commit 3c2ea7697c
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
7 changed files with 44 additions and 12 deletions

View file

@ -366,7 +366,15 @@ public final class NavigationHelper {
if (switchingPlayers) {
// Situation when user switches from players to main player. All needed data is
// here, we can start watching (assuming newQueue equals playQueue).
detailFragment.openVideoPlayer();
// Starting directly in fullscreen if the previous player type was popup.
if (playerType == MainPlayer.PlayerType.POPUP
&& !detailFragment.isLandscape()
&& PlayerHelper.globalScreenOrientationLocked(context)) {
detailFragment.onScreenRotationButtonClicked();
}
// pass false to directlyFullscreenIfApplicable since that's handled just above here
detailFragment.openVideoPlayer(false);
} else {
detailFragment.selectAndLoadVideo(serviceId, url, title, playQueue);
}