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(UI): Add config for refreshTickInSeconds #6386

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ JW Player <*@jwplayer.com>
Konstantin Grushetsky <github@grushetsky.net>
Lucas Gabriel Sánchez <unkiwii@gmail.com>
Martin Stark <martin.stark@eyevinn.se>
Mariano Facundo Scigliano <mfacundo94@gmail.com>
Matthias Van Parijs <matvp91@gmail.com>
Mattias Wadman <mattias.wadman@gmail.com>
Mirego <*@mirego.com>
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Leandro Ribeiro Moreira <leandro.ribeiro.moreira@gmail.com>
Loïc Raux <loicraux@gmail.com>
Lucas Gabriel Sánchez <unkiwii@gmail.com>
Martin Stark <martin.stark@eyevinn.se>
Mariano Facundo Scigliano <mfacundo94@gmail.com>
Matias Russitto <russitto@gmail.com>
Mathieu Côté <mcote@mirego.com>
Matthias Van Parijs <matvp91@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion ui/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
this.onCastStatusChange_();

// Start this timer after we are finished initializing everything,
this.timeAndSeekRangeTimer_.tickEvery(/* seconds= */ 0.125);
this.timeAndSeekRangeTimer_.tickEvery(this.config_.refreshTickInSeconds);

this.eventManager_.listen(this.localization_,
shaka.ui.Localization.LOCALE_CHANGED, (e) => {
Expand Down
6 changes: 5 additions & 1 deletion ui/externs/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ shaka.extern.UIVolumeBarColors;
* preferDocumentPictureInPicture: boolean,
* showAudioChannelCountVariants: boolean,
* seekOnTaps: boolean,
* tapSeekDistance: number
* tapSeekDistance: number,
* refreshTickInSeconds: number
* }}
*
* @property {!Array.<string>} controlPanelElements
Expand Down Expand Up @@ -228,6 +229,9 @@ shaka.extern.UIVolumeBarColors;
* right part of the video. If less than or equal to 0,
* no seeking will occur.
* Defaults to 10 seconds.
* @property {number} refreshTickInSeconds
* The time interval, in seconds, to update the seek bar.
* Defaults to 0.125 seconds.
* @exportDoc
*/
shaka.extern.UIConfiguration;
Expand Down
1 change: 1 addition & 0 deletions ui/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ shaka.ui.Overlay = class {
showAudioChannelCountVariants: true,
seekOnTaps: true,
tapSeekDistance: 10,
refreshTickInSeconds: 0.125,
};

// eslint-disable-next-line no-restricted-syntax
Expand Down