diff --git a/Sources/Playback/Player/PlayerViewController.swift b/Sources/Playback/Player/PlayerViewController.swift index 092f048a3afc87f92fd0dff4464deaf7f319a018..19490da2c9443b84708901eb96c8dc9ea9a45a0f 100644 --- a/Sources/Playback/Player/PlayerViewController.swift +++ b/Sources/Playback/Player/PlayerViewController.swift @@ -666,25 +666,24 @@ class PlayerViewController: UIViewController { let location: CGPoint = recognizer.location(in: window) // If minimization handler not ended yet, don't detect other gestures to don't block it. - guard minimizationInitialCenter == nil else { return .none } + guard minimizationInitialCenter == nil else { + return .none + } - var panType: PlayerPanType = .none - if location.x < 2 * windowWidth / 3 { - panType = .none + guard !playbackService.currentMediaIs360Video else { + return .projection } + + var panType: PlayerPanType = .none + #if os(iOS) - if location.x < 1 * windowWidth / 3 && playerController.isBrightnessGestureEnabled { + if location.x < windowWidth / 2 && playerController.isBrightnessGestureEnabled { panType = .brightness - } - if location.x < 3 * windowWidth / 3 && playerController.isVolumeGestureEnabled { + } else if location.x > windowWidth / 2 && playerController.isVolumeGestureEnabled { panType = .volume } #endif - if playbackService.currentMediaIs360Video { - panType = .projection - } - return panType }