Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The present pull request aims to provide a solution to #3443 (How to Customise PlayBackRate or Fast_Forward rate) by adding optional custom rates for playback, fast forward and rewind.
Fixes: #3443
Example
How to preview
Initialize the client with a
config
that containsplayback_rate
,fast_forward
andrewind
in thecontrolPanelElements
and select a list of rates forplaybackRates
,fastForwardRates
andrewindRates
.Changelog
docs/tutorials/ui-customization.md
Adds a brief description and example for the
playbackRates
,fastForwardRates
andrewindRates
configuration.ui/externs/ui.js
playbackRates
,fastForwardRates
andrewindRates
are added as configurable options in the UI.ui/fast_forward_button.js
this.fastForwardRates_
is added to load the configured rates. On every click, the next rate in the array is selected until the end is reached, where the rate is set back to the initial value atthis.fastForwardRates_[0]
.ui/playback_rate_selection.js
The original
this.playbackRates_
map is built through a configurable array of numbers (playbackRates
) and which also generates the text value ('1.25x' for 1.25).ui/rewind_button.js
this.rewindRates_
is added to load the configured rates. On every click, the next rate in the array is selected until the end is reached, where the rate is set back to the initial value atthis.rewindRates_[0]
.ui/ui.js
Adds default values for
playbackRates
,fastForwardRates
andrewindRates
.Checklist