diff --git a/src/js/control-bar/progress-control/seek-bar.js b/src/js/control-bar/progress-control/seek-bar.js index 28e52771d5..c12dfda627 100644 --- a/src/js/control-bar/progress-control/seek-bar.js +++ b/src/js/control-bar/progress-control/seek-bar.js @@ -78,7 +78,9 @@ class SeekBar extends Slider { if (document.hidden) { this.disableInterval_(e); } else { - this.enableInterval_(); + if (!this.player_.paused() && !this.player_.hasClass('vjs-waiting')) { + this.enableInterval_(); + } // we just switched back to the page and someone may be looking, so, update ASAP this.update(); @@ -133,9 +135,8 @@ class SeekBar extends Slider { * The current percent at a number from 0-1 */ update(event) { - const percent = super.update(); - this.requestAnimationFrame(() => { + const percent = super.update(); const currentTime = this.player_.ended() ? this.player_.duration() : this.getCurrentTime_(); const liveTracker = this.player_.liveTracker; @@ -167,8 +168,6 @@ class SeekBar extends Slider { this.duration_ = duration; } }); - - return percent; } /**