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

feat: add class to normalise time control display #8833

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

mister-ben
Copy link
Contributor

@mister-ben mister-ben commented Aug 15, 2024

Description

Time controls continue to cause confusion as they are included by default but hidden by default. e.g. #8534 Adding CSS to display them is not intuitive.

Specific Changes proposed

Changing the default styles would be problematic before a major version. This PR proposes adding an optional vjs-normalise-time-controls class a user can add to the player, as an opt in.

This will default all time controls to being shown, except when live content is playing. Users would then have to remove the time controls in player options, or with hide() or dispose().

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
    • Has no DOM changes which impact accessiblilty or trigger warnings (e.g. Chrome issues tab)
    • Has no changes to JSDoc which cause npm run docs:api to error
  • Reviewed by Two Core Contributors

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.21%. Comparing base (8c56e31) to head (8f6b0a7).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8833   +/-   ##
=======================================
  Coverage   83.21%   83.21%           
=======================================
  Files         120      120           
  Lines        8066     8066           
  Branches     1937     1937           
=======================================
  Hits         6712     6712           
  Misses       1354     1354           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mister-ben mister-ben added the needs: LGTM Needs one or more additional approvals label Aug 23, 2024
@mister-ben mister-ben changed the title feat: add class to normalise time contol display feat: add class to normalise time control display Aug 27, 2024
@adrums86
Copy link
Contributor

adrums86 commented Sep 9, 2024

Merging this for the next release.

@edwinbradford
Copy link

I'm in the middle of updating my VideoJS skin which I haven't touched for years and found this thread. I have everything working by adding player.addClass("vjs-normalise-time-controls"); to my configuration options. Can I please confirm if this is intended to be a temporary solution until the next major release as mentioned or a long term solution as if it's temporary it would be nice if there's a way to follow this issue so I can be notified when the long term solution is implemented.

@mister-ben mister-ben removed the needs: LGTM Needs one or more additional approvals label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants