Fix player gesture

This commit is contained in:
Arkadiusz Fal 2022-07-11 20:15:48 +02:00
parent 38edf75f46
commit 074e4b23d3

View File

@ -213,7 +213,7 @@ struct VideoPlayerView: View {
hovering ? playerControls.show() : playerControls.hide() hovering ? playerControls.show() : playerControls.hide()
} }
#if os(iOS) #if os(iOS)
.gesture(isPlayerDragGestureEnabled ? playerDragGesture : nil) .gesture(playerControls.presentingOverlays ? nil : playerDragGesture)
#elseif os(macOS) #elseif os(macOS)
.onAppear(perform: { .onAppear(perform: {
NSEvent.addLocalMonitorForEvents(matching: [.mouseMoved]) { NSEvent.addLocalMonitorForEvents(matching: [.mouseMoved]) {
@ -361,10 +361,6 @@ struct VideoPlayerView: View {
} }
} }
var isPlayerDragGestureEnabled: Bool {
!player.controls.presentingDetailsOverlay && !player.controls.presentingDetailsOverlay
}
var controlsTopPadding: Double { var controlsTopPadding: Double {
guard fullScreenLayout else { return 0 } guard fullScreenLayout else { return 0 }