videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
37.53k stars 7.4k forks source link

Mouseover tooltip on progress bar is not in sync with cursor when Zoom is used in css #8759

Open surajsokasane opened 1 month ago

surajsokasane commented 1 month ago

Description

mouse over tooltip, which displays the time where the cursor is currently. It's position is calculated according to the percentage where mouse is. But when we use Zoom in body, the width of progress bar is not real and so the tooltip is displayed eigther on left or right side of cursor depending on zoom in or zoom out.

Reduced test case

https://stackblitz.com/edit/stackblitz-starters-nwb3mh?file=src%2Fglobal_styles.css

Steps to reproduce

  1. Add a video in html
  2. Give it any source -mp4/m3u8
  3. Add Zoom: 80% to body in css
  4. hover on progressbar of video

Errors

The mousehover tooltip is not in sync with cursor

What version of Video.js are you using?

8.12.0

Video.js plugins used.

None

What browser(s) including version(s) does this occur with?

Chrome 125.0.6422.142

What OS(es) and version(s) does this occur with?

All

welcome[bot] commented 1 month ago

👋 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.

mister-ben commented 11 hours ago

It seems getting the effective css zoom applied to an element is difficult other than on Firefox, which supports a currentCSSZoom property