-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
getPointerPosition returns wrong position if the container is transformed #6726
Comments
👋 Thanks for opening your first issue here! 👋 If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Yeah, there's definitely an issue and there is a PR that needs to be fixed up that addresses this #5773 |
This uses offsetX and offsetY on the MouseEvents which helps account for transforms on the player. Unfortunately, this isn't available on TouchEvents, so, while this helps desktop devices with using a mouse, it doesn't help mobile devices using touch. Fixes videojs#6726, fixes videojs#1102.
Description
Briefly describe the issue.
The algorithm of getPointerPosition assumes that video container is not subject to scaling and rotation transformations. As a result, it produces the wrong value what such transformations exist.
Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue.
Add the video container in a div that has a transformation. See attached file
video_test.zip
The slider does not provide correct position
#version: 7.7.5
The text was updated successfully, but these errors were encountered: