diff --git a/lib/text/ui_text_displayer.js b/lib/text/ui_text_displayer.js index 1ac4df3813..1b138e719a 100644 --- a/lib/text/ui_text_displayer.js +++ b/lib/text/ui_text_displayer.js @@ -72,7 +72,9 @@ shaka.text.UITextDisplayer = class { /** @private {shaka.util.Timer} */ this.captionsTimer_ = new shaka.util.Timer(() => { - this.updateCaptions_(); + if (!this.video_.paused) { + this.updateCaptions_(); + } }).tickEvery(updatePeriod); /** @@ -93,6 +95,10 @@ shaka.text.UITextDisplayer = class { this.updateCaptions_(/* forceUpdate= */ true); }); + this.eventManager_.listen(this.video_, 'seeking', () => { + this.updateCaptions_(/* forceUpdate= */ true); + }); + // From: https://html.spec.whatwg.org/multipage/media.html#dom-video-videowidth // Whenever the natural width or natural height of the video changes // (including, for example, because the selected video track was changed),