Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using video element inside useDrag component doesn't allow the video to play/pause using single click over the video #631

Closed
2 tasks
pranjalmahajan96 opened this issue Sep 26, 2023 · 6 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@pranjalmahajan96
Copy link

Describe the bug

Using useDrag with a component which has a video element inside, doesn't allow the video to play or pause via clicking over the video (and not via the controls bar) which is a usual behaviour of the video element

Sandbox or Video

https://codesandbox.io/s/usedrag-video-6qjy33?file=/src/App.tsx

Information:

  • Use Gesture version: [tried with v10.3.0, v10.2.22]
  • Device: [macbook]
  • OS: [macOS 13.2.1]
  • Browser [chrome]

Checklist:

  • I've read the documentation.
  • If this is an issue with drag, I've tried setting touch-action: none to the draggable element.
@dbismut dbismut closed this as completed Sep 26, 2023
@dbismut dbismut added the wontfix This will not be worked on label Sep 26, 2023
@pranjalmahajan96
Copy link
Author

https://6qjy33.csb.app/
please check this link, play pause should work with on single click on video
the codesandbox: https://codesandbox.io/s/usedrag-video-6qjy33?file=/src/App.tsx

@dbismut dbismut reopened this Sep 27, 2023
@dbismut dbismut removed the wontfix This will not be worked on label Sep 27, 2023
@dbismut
Copy link
Collaborator

dbismut commented Sep 27, 2023

Sorry, I think I misunderstood your issue previously, my apologies. I guess pointer capturing is messing with controlling the video for some reason.

Please try with the { pointer: { capture: false } } option. See forked version here. https://codesandbox.io/s/usedrag-video-forked-zp5rtw?file=/src/App.tsx

@devcer
Copy link

devcer commented Oct 5, 2023

@dbismut I have used the pointer capture setting to false solution but looks like the video is undraggable on Firefox browser. I was using Firefox v118.0.1 to test your code sandbox. Any thoughts on this?

@devcer
Copy link

devcer commented Oct 5, 2023

Also if you adjust the width of the video player to 450px. the volume button would change to slider on Safari and adjusting volume is getting considered as a drag and the whole container is movable. Any thoughts on how I can handle this?

@pranjalmahajan96
Copy link
Author

pranjalmahajan96 commented Oct 9, 2023

@dbismut I have used the pointer capture setting to false solution but looks like the video is undraggable on Firefox browser. I was using Firefox v118.0.1 to test your code sandbox. Any thoughts on this?

any updates? @dbismut

@dbismut
Copy link
Collaborator

dbismut commented Oct 9, 2023

No. I would suggest trying to implement dragging a video on your end and posting your findings.

@dbismut dbismut closed this as completed Nov 22, 2023
@dbismut dbismut added the wontfix This will not be worked on label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants