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: Make seek bar keyboard skip increment configurable #8919

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mister-ben
Copy link
Contributor

Description

Pressing the arrow and page keys seeks, currently by a set interval. This change makes this configurable.

Specific Changes proposed

Adds options that can be included in player options which set the increments to used.

{
  controlBar: {
    progressControl: {
      seekBar: {
        stepSeconds: 2,
        pageMultiplier: 4
      }
    }
  }
}

Defaults remain as 5 seconds for left/right and 12x multiplier for page up/down.

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 Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.83%. Comparing base (964c40e) to head (d115197).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8919      +/-   ##
==========================================
+ Coverage   83.42%   83.83%   +0.40%     
==========================================
  Files         120      120              
  Lines        8097     8096       -1     
  Branches     1944     1944              
==========================================
+ Hits         6755     6787      +32     
+ Misses       1342     1309      -33     

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

@mister-ben
Copy link
Contributor Author

Couple of points for feedback in particular:

  • I'd considered making the increment for this and the seek buttons the same, but I'm not certain that would necessarily be what's wanted. Plus it would mean changing defaults in one the other.
  • Making this a top level player option for convenience

* @param {number} [options.stepSeconds=5]
* The number of seconds to increment on keyboard control
* @param {number} [options.pageMultiplier=12]
* The multiplier of stepSeconds that PgUp/PgDown move the timeline.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always forget that page up/down works.

Copy link

@PlutaKatarzyna PlutaKatarzyna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

@mister-ben mister-ben added the minor This PR can be added to a minor release. It should not be added to a patch release. label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor This PR can be added to a minor release. It should not be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants