Skip to content

Commit 347bd31

Browse files
Check if rotation is needed whether the screen orientation is locked or unlocked.
1 parent b22e17e commit 347bd31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,8 @@ public void toggleFullscreen() {
937937

938938
// When the video ends, the player exits fullscreen mode but remains in landscape mode.
939939
// This corrects the orientation. See #13057.
940-
if (player.getCurrentState() == STATE_COMPLETED) {
940+
if (player.getCurrentState() == STATE_COMPLETED
941+
&& globalScreenOrientationLocked(context)) {
941942
player.getFragmentListener()
942943
.ifPresent(PlayerServiceEventListener::onScreenRotationButtonClicked);
943944
}

0 commit comments

Comments
 (0)