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

Custom forward seek and backward seek using keyboard. #4245

Closed
dolphincodes opened this issue May 18, 2022 · 1 comment · Fixed by #4246
Closed

Custom forward seek and backward seek using keyboard. #4245

dolphincodes opened this issue May 18, 2022 · 1 comment · Fixed by #4246
Assignees
Labels
component: UI The issue involves the Shaka Player UI priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@dolphincodes
Copy link

Hi,
The default forward and backward seek time using the keyboard is 5 seconds.
Arrow left -5 second
Arrow right 5 second

Is there any way to change the default 5 second value to a custom one without disabling the enableKeyboardPlaybackControls option.

@dolphincodes dolphincodes added the type: question A question from the community label May 18, 2022
@theodab
Copy link
Contributor

theodab commented May 19, 2022

Those values are hardcoded in the UI.

shaka-player/ui/controls.js

Lines 1264 to 1279 in 84fe995

case 'ArrowLeft':
// If it's not focused on the volume bar, move the seek time backward
// for 5 sec. Otherwise, the volume will be adjusted automatically.
if (this.seekBar_ && !isVolumeBar) {
event.preventDefault();
this.seek_(this.seekBar_.getValue() - 5);
}
break;
case 'ArrowRight':
// If it's not focused on the volume bar, move the seek time forward
// for 5 sec. Otherwise, the volume will be adjusted automatically.
if (this.seekBar_ && !isVolumeBar) {
event.preventDefault();
this.seek_(this.seekBar_.getValue() + 5);
}
break;

This sounds like it would be a reasonable configuration value to add to shaka.extern.UIConfiguration though.

@theodab theodab added type: enhancement New feature or request component: UI The issue involves the Shaka Player UI priority: P3 Useful but not urgent and removed type: question A question from the community labels May 19, 2022
@theodab theodab self-assigned this May 19, 2022
@avelad avelad added this to the v4.1 milestone May 19, 2022
theodab added a commit to theodab/shaka-player that referenced this issue May 19, 2022
This new configuration value allows users to determine how far
the video seeks when you press the arrow keys on the video
element.

Closes shaka-project#4245
avelad pushed a commit that referenced this issue May 19, 2022
This new configuration value allows users to determine how far
the video seeks when you press the arrow keys on the video
element.

Closes #4245

<!--
Please remember to:

1. Use Conventional Commits syntax (fix: ..., feat: ..., etc.) in commits and
   PR title (https://www.conventionalcommits.org/)
2. Tag any related or fixed issues ("Issue #123", "Closes #420")
3. Sign the Google CLA if you haven't (https://cla.developers.google.com)

You may delete this comment from the PR description.
-->
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: UI The issue involves the Shaka Player UI priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants