video.js icon indicating copy to clipboard operation
video.js copied to clipboard

Add a player option keepTimeTooltipInSeekBar to prevent time tooltip overflow

Open Ami-OS opened this issue 2 years ago • 3 comments

Screenshot from 2022-09-04 02-31-24

Description

Originally, the time tooltip was allowed to overflow into the seek bar, which is fine in general but for those who want to customize their skins, allowing overflow is not necessarily a good idea.

This PR allows developers to easily keep the time tooltip inside the seek bar with a single player configuration option.

Specific Changes proposed

Add a player option keepTimeTooltipInSeekBar which, if set to true, prevents the time tooltip overflow the seek bar

Requirements Checklist

  • [x] Feature implemented / Bug fixed
  • [ ] If necessary, more likely in a feature request than a bug fix
    • [x] Change has been verified in an actual browser (Chrome, Firefox, IE)
    • [ ] Unit Tests updated or fixed
    • [ ] Docs/guides updated
    • [x] Example created (starter template on JSBin)
  • [ ] Reviewed by Two Core Contributors

Gallerys

CSS Skins

keepTimeTooltipInSeekBar - diff

Ami-OS avatar Sep 03 '22 19:09 Ami-OS

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

welcome[bot] avatar Sep 03 '22 19:09 welcome[bot]

Codecov Report

Merging #7913 (65750e3) into main (4e2f8ad) will decrease coverage by 0.10%. The diff coverage is 36.36%.

@@            Coverage Diff             @@
##             main    #7913      +/-   ##
==========================================
- Coverage   80.94%   80.83%   -0.11%     
==========================================
  Files         116      116              
  Lines        7467     7479      +12     
  Branches     1816     1821       +5     
==========================================
+ Hits         6044     6046       +2     
- Misses       1423     1433      +10     
Impacted Files Coverage Δ
...rc/js/control-bar/progress-control/time-tooltip.js 66.66% <36.36%> (-15.39%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Sep 12 '22 13:09 codecov[bot]