Fix orientation (#121)

This commit is contained in:
Arkadiusz Fal
2022-05-29 15:34:40 +02:00
parent c48d478f64
commit 71de78113d
5 changed files with 14 additions and 25 deletions

View File

@@ -252,9 +252,9 @@ final class MPVBackend: PlayerBackend {
model.toggleFullscreen(controls?.playingFullscreen ?? false)
#if os(iOS)
if Defaults[.lockLandscapeWhenEnteringFullscreen] {
Orientation.lockOrientation(.landscape, andRotateTo: UIDevice.current.orientation.isLandscape ? nil : .landscapeRight)
}
if Defaults[.lockOrientationInFullScreen] {
Orientation.lockOrientation(.landscape, andRotateTo: UIDevice.current.orientation.isLandscape ? nil : .landscapeRight)
}
#endif
}