Coder Social home page Coder Social logo

using video element inside useDrag component doesn't allow the video to play/pause using single click over the video about use-gesture HOT 6 CLOSED

pranjalmahajan96 avatar pranjalmahajan96 commented on July 23, 2024
using video element inside useDrag component doesn't allow the video to play/pause using single click over the video

from use-gesture.

Comments (6)

dbismut avatar dbismut commented on July 23, 2024 1

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

from use-gesture.

pranjalmahajan96 avatar pranjalmahajan96 commented on July 23, 2024

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

from use-gesture.

devcer avatar devcer commented on July 23, 2024

@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?

from use-gesture.

devcer avatar devcer commented on July 23, 2024

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?

from use-gesture.

pranjalmahajan96 avatar pranjalmahajan96 commented on July 23, 2024

@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

from use-gesture.

dbismut avatar dbismut commented on July 23, 2024

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

from use-gesture.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.