Add setting "Rotate to portrait when exiting fullscreen"

This commit is contained in:
Arkadiusz Fal
2022-08-07 13:48:50 +02:00
parent 8e2c30bf00
commit 0365369dcd
7 changed files with 31 additions and 46 deletions

View File

@@ -415,7 +415,7 @@ struct VideoPlayerView: View {
{
DispatchQueue.main.async {
player.controls.presentingControls = false
player.enterFullScreen()
player.enterFullScreen(showControls: false)
}
}
@@ -447,10 +447,10 @@ struct VideoPlayerView: View {
if orientation.isLandscape {
player.controls.presentingControls = false
player.enterFullScreen()
player.enterFullScreen(showControls: false)
Orientation.lockOrientation(OrientationTracker.shared.currentInterfaceOrientationMask, andRotateTo: orientation)
} else {
player.exitFullScreen()
player.exitFullScreen(showControls: false)
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: .portrait)
}
}