mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Revert "Remove "Honor system orientation lock""
This reverts commit 2d51f6adff
.
This commit is contained in:
@@ -8,9 +8,7 @@ extension VideoPlayerView {
|
||||
if currentOrientation.isLandscape,
|
||||
Defaults[.enterFullscreenInLandscape],
|
||||
!player.playingFullScreen,
|
||||
!player.playingInPictureInPicture,
|
||||
!player.currentItem.isNil,
|
||||
player.lockedOrientation.isNil || player.lockedOrientation!.contains(.landscape)
|
||||
!player.playingInPictureInPicture
|
||||
{
|
||||
guard player.presentingPlayer else { return }
|
||||
|
||||
@@ -29,7 +27,8 @@ extension VideoPlayerView {
|
||||
object: nil,
|
||||
queue: .main
|
||||
) { _ in
|
||||
guard player.presentingPlayer,
|
||||
guard !Defaults[.honorSystemOrientationLock],
|
||||
player.presentingPlayer,
|
||||
!player.playingInPictureInPicture,
|
||||
player.lockedOrientation.isNil
|
||||
else {
|
||||
|
@@ -155,6 +155,8 @@ struct VideoPlayerView: View {
|
||||
}
|
||||
stopOrientationUpdates()
|
||||
player.controls.hideOverlays()
|
||||
|
||||
player.lockedOrientation = nil
|
||||
}
|
||||
.onAnimationCompleted(for: viewDragOffset) {
|
||||
guard !dragGestureState else { return }
|
||||
|
Reference in New Issue
Block a user