SvenTiigi / YouTubePlayerKit

A Swift Package to easily play YouTube videos 📺
https://sventiigi.github.io/YouTubePlayerKit/
MIT License
717 stars 64 forks source link

Swipe gesture not working once video is playing #103

Closed gurpreetSinghGit closed 1 month ago

gurpreetSinghGit commented 2 months ago

What happened?

YouTubePlayerView(self.youTubePlayer) { state in // Overlay ViewBuilder closure to place an overlay View // for the current YouTubePlayer.State switch state { case .idle: ProgressView() case .ready: EmptyView() case .error(let error): Text(verbatim: "YouTube player couldn't be loaded") } } .frame(height: 500) .background(Color.red) .gesture( DragGesture() .onChanged { value in print(" Dragging:") } .onEnded { value in print(" Drag ended:") } )

            Drag gesture not working if video is playing is there any work around or fix for this ?

What are the steps to reproduce?

Step 1: Use the player in app Step 2: drag the player (logs appear) Step 3: Play the video in player Step 4: drag the player (no logs appear)

What is the expected behavior?

The drag logs should appear even if youtube video is playing. Simultaneous gestures and high priority gestures are not working.

SvenTiigi commented 1 month ago

Hi @gurpreetSinghGit,

Since this issue is outside the scope of the YouTubePlayerKit, I would recommend asking on platforms like StackOverflow, which are better suited for general SwiftUI and integration questions.