mirror of
https://github.com/videojs/video.js.git
synced 2025-03-17 21:18:27 +02:00
fix: updates seekbar position after mouse up event is triggered. (#6372)
When we are paused, call update directly, otherwise, call the throttled update. Fixes #6232, fixes #6234, fixes #6370.
This commit is contained in:
parent
917d898a48
commit
cd4076a566
@ -52,7 +52,8 @@ class SeekBar extends Slider {
|
||||
* @private
|
||||
*/
|
||||
setEventHandlers_() {
|
||||
this.update = Fn.throttle(Fn.bind(this, this.update), UPDATE_REFRESH_INTERVAL);
|
||||
this.update_ = Fn.bind(this, this.update);
|
||||
this.update = Fn.throttle(this.update_, UPDATE_REFRESH_INTERVAL);
|
||||
|
||||
this.on(this.player_, ['ended', 'durationchange', 'timeupdate'], this.update);
|
||||
if (this.player_.liveTracker) {
|
||||
@ -335,6 +336,10 @@ class SeekBar extends Slider {
|
||||
this.player_.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true });
|
||||
if (this.videoWasPlaying) {
|
||||
silencePromise(this.player_.play());
|
||||
} else {
|
||||
// We're done seeking and the time has changed.
|
||||
// If the player is paused, make sure we display the correct time on the seek bar.
|
||||
this.update_();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user