diff --git a/Shared/Player/VideoPlayerView.swift b/Shared/Player/VideoPlayerView.swift index c633f619..0ecc1f59 100644 --- a/Shared/Player/VideoPlayerView.swift +++ b/Shared/Player/VideoPlayerView.swift @@ -152,6 +152,10 @@ struct VideoPlayerView: View { .gesture( DragGesture(coordinateSpace: .global) .onChanged { value in + guard player.presentingPlayer else { + return // swiftlint:disable:this implicit_return + } + player.backend.setNeedsDrawing(false) let drag = value.translation.height @@ -159,6 +163,11 @@ struct VideoPlayerView: View { return // swiftlint:disable:this implicit_return } + guard drag < 100 else { + player.hide() + return + } + withAnimation(.easeInOut(duration: 0.2)) { viewVerticalOffset = drag }