From f30343cfca95b90cfaf09a508ae66b0fecb232a6 Mon Sep 17 00:00:00 2001 From: dmitrylyzo <56478732+dmitrylyzo@users.noreply.github.com> Date: Mon, 24 Jun 2024 20:30:57 -0400 Subject: [PATCH] Backport pull request #5718 from jellyfin-web/release-10.9.z HtmlVideoPlayer fix and cleanup Original-merge: 18061ce247195e3104a478806a28ade005e2d435 Merged-by: thornbill Backported-by: Joshua M. Boniface --- src/plugins/htmlVideoPlayer/plugin.js | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index f26e89cc92..5885147cb0 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -209,10 +209,6 @@ export class HtmlVideoPlayer { * @type {number | null} */ #audioTrackIndexToSetOnPlaying; - /** - * @type {null | undefined} - */ - #currentClock; /** * @type {any | null | undefined} */ @@ -862,6 +858,8 @@ export class HtmlVideoPlayer { videoElement.parentNode.removeChild(videoElement); } + this._currentAspectRatio = null; + const dlg = this.#videoDialog; if (dlg) { this.#videoDialog = null; @@ -1169,9 +1167,6 @@ export class HtmlVideoPlayer { this.destroyNativeTracks(videoElement, targetTrackIndex); this.destroyStoredTrackInfo(targetTrackIndex); - this.#currentClock = null; - this._currentAspectRatio = null; - const octopus = this.#currentAssRenderer; if (octopus) { octopus.dispose(); @@ -1499,16 +1494,6 @@ export class HtmlVideoPlayer { * @private */ updateSubtitleText(timeMs) { - const clock = this.#currentClock; - if (clock) { - try { - clock.seek(timeMs / 1000); - } catch (err) { - console.error(`error in libjass: ${err}`); - } - return; - } - const allTrackEvents = [this.#currentTrackEvents, this.#currentSecondaryTrackEvents]; const subtitleTextElements = [this.#videoSubtitlesElem, this.#videoSecondarySubtitlesElem];