Orientation fixes

This commit is contained in:
Arkadiusz Fal
2023-05-21 11:54:17 +02:00
parent 08ce572b9e
commit 2b7ccc4b03
2 changed files with 14 additions and 9 deletions

View File

@@ -140,15 +140,6 @@ struct VideoPlayerView: View {
}
}
}
.onDisappear {
if Defaults[.lockPortraitWhenBrowsing] {
Orientation.lockOrientation(.portrait, andRotateTo: .portrait)
} else {
Orientation.lockOrientation(.allButUpsideDown)
}
orientationModel.stopOrientationUpdates()
player.controls.hideOverlays()
}
.onReceive(NotificationCenter.default.publisher(for: UIDevice.orientationDidChangeNotification)) { _ in
guard player.lockedOrientation.isNil else {
return