From cedaa66bf87d67f2dba5b94b70cfe7b5a38b5672 Mon Sep 17 00:00:00 2001 From: redSpoutnik <15638041+redSpoutnik@users.noreply.github.com> Date: Sat, 30 Nov 2019 20:01:32 +0100 Subject: [PATCH] reset subtitleOffset and showtrackOffset values on next episode play --- src/components/htmlvideoplayer/plugin.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/htmlvideoplayer/plugin.js b/src/components/htmlvideoplayer/plugin.js index 080cdb3e27..8982f53491 100644 --- a/src/components/htmlvideoplayer/plugin.js +++ b/src/components/htmlvideoplayer/plugin.js @@ -280,6 +280,8 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa self._currentTime = null; + self.resetSubtitleOffset(); + return createMediaElement(options).then(function (elem) { return updateVideoUrl(options, options.mediaSource).then(function () { @@ -556,6 +558,15 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa setCurrentTrackElement(index); }; + self.resetSubtitleOffset = function() { + if (currentTrackOffset) { + currentTrackOffset = 0; + } + if (showTrackOffset) { + showTrackOffset = false; + } + } + self.enableShowingSubtitleOffset = function() { showTrackOffset = true; }