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

getPointerPosition returns wrong position if the container is transformed #6726

Closed
vakarelov opened this issue Jun 24, 2020 · 3 comments
Closed

Comments

@vakarelov
Copy link

vakarelov commented Jun 24, 2020

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.

  1. Add the video container in a div that has a transformation. See attached file
    video_test.zip

  2. The slider does not provide correct position

#version: 7.7.5

@welcome
Copy link

welcome bot commented Jun 24, 2020

👋 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.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@vakarelov vakarelov changed the title getPointerPosition returns wrong position is the container is transformed getPointerPosition returns wrong position if the container is transformed Jun 24, 2020
@stale
Copy link

stale bot commented Aug 23, 2020

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.

@stale stale bot added the outdated Things closed automatically by stalebot label Aug 23, 2020
@gkatsev gkatsev removed the outdated Things closed automatically by stalebot label Aug 27, 2020
@gkatsev
Copy link
Member

gkatsev commented Aug 27, 2020

Yeah, there's definitely an issue and there is a PR that needs to be fixed up that addresses this #5773

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
edirub pushed a commit to edirub/video.js that referenced this issue Jun 8, 2023
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants