From 2c4d065e0ebaca280bc71a2e5c126d22203168be Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Thu, 9 Mar 2023 19:43:07 -0500 Subject: [PATCH] Backport pull request #4362 from jellyfin/release-10.8.z Fix subtitle offset reset when seeking progressive stream Original-merge: af27e084d5fd6d7f0372b8f10a5eff339c73866c Merged-by: Bill Thornton Backported-by: crobibero --- src/components/playback/playbackmanager.js | 1 + src/plugins/htmlVideoPlayer/plugin.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index 947f46eec8..e6cba06d2e 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -1740,6 +1740,7 @@ class PlaybackManager { const streamInfo = createStreamInfo(apiClient, currentItem.MediaType, currentItem, currentMediaSource, ticks, player); streamInfo.fullscreen = currentPlayOptions.fullscreen; streamInfo.lastMediaInfoQuery = lastMediaInfoQuery; + streamInfo.resetSubtitleOffset = false; if (!streamInfo.url) { showPlaybackInfoErrorMessage(self, 'PlaybackErrorNoCompatibleStream'); diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index 2582785f8e..a4f512768f 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -382,7 +382,7 @@ function tryRemoveElement(elem) { this.#currentTime = null; - this.resetSubtitleOffset(); + if (options.resetSubtitleOffset !== false) this.resetSubtitleOffset(); return this.createMediaElement(options).then(elem => { return this.updateVideoUrl(options).then(() => {