Remove "Honor system orientation lock"

Fix #309
This commit is contained in:
Arkadiusz Fal
2022-09-24 14:47:24 +02:00
parent 3273032ffb
commit 2d51f6adff
4 changed files with 4 additions and 13 deletions

View File

@@ -8,7 +8,9 @@ extension VideoPlayerView {
if currentOrientation.isLandscape,
Defaults[.enterFullscreenInLandscape],
!player.playingFullScreen,
!player.playingInPictureInPicture
!player.playingInPictureInPicture,
!player.currentItem.isNil,
player.lockedOrientation.isNil || player.lockedOrientation!.contains(.landscape)
{
guard player.presentingPlayer else { return }
@@ -27,8 +29,7 @@ extension VideoPlayerView {
object: nil,
queue: .main
) { _ in
guard !Defaults[.honorSystemOrientationLock],
player.presentingPlayer,
guard player.presentingPlayer,
!player.playingInPictureInPicture,
player.lockedOrientation.isNil
else {

View File

@@ -163,8 +163,6 @@ struct VideoPlayerView: View {
}
stopOrientationUpdates()
player.controls.hideOverlays()
player.lockedOrientation = nil
}
.onAnimationCompleted(for: viewDragOffset) {
guard !dragGestureState else { return }