mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-27 08:10:34 +00:00
Backport pull request #5718 from jellyfin-web/release-10.9.z
HtmlVideoPlayer fix and cleanup
Original-merge: 18061ce247
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
2cbc9e4abf
commit
f30343cfca
@ -209,10 +209,6 @@ export class HtmlVideoPlayer {
|
|||||||
* @type {number | null}
|
* @type {number | null}
|
||||||
*/
|
*/
|
||||||
#audioTrackIndexToSetOnPlaying;
|
#audioTrackIndexToSetOnPlaying;
|
||||||
/**
|
|
||||||
* @type {null | undefined}
|
|
||||||
*/
|
|
||||||
#currentClock;
|
|
||||||
/**
|
/**
|
||||||
* @type {any | null | undefined}
|
* @type {any | null | undefined}
|
||||||
*/
|
*/
|
||||||
@ -862,6 +858,8 @@ export class HtmlVideoPlayer {
|
|||||||
videoElement.parentNode.removeChild(videoElement);
|
videoElement.parentNode.removeChild(videoElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._currentAspectRatio = null;
|
||||||
|
|
||||||
const dlg = this.#videoDialog;
|
const dlg = this.#videoDialog;
|
||||||
if (dlg) {
|
if (dlg) {
|
||||||
this.#videoDialog = null;
|
this.#videoDialog = null;
|
||||||
@ -1169,9 +1167,6 @@ export class HtmlVideoPlayer {
|
|||||||
this.destroyNativeTracks(videoElement, targetTrackIndex);
|
this.destroyNativeTracks(videoElement, targetTrackIndex);
|
||||||
this.destroyStoredTrackInfo(targetTrackIndex);
|
this.destroyStoredTrackInfo(targetTrackIndex);
|
||||||
|
|
||||||
this.#currentClock = null;
|
|
||||||
this._currentAspectRatio = null;
|
|
||||||
|
|
||||||
const octopus = this.#currentAssRenderer;
|
const octopus = this.#currentAssRenderer;
|
||||||
if (octopus) {
|
if (octopus) {
|
||||||
octopus.dispose();
|
octopus.dispose();
|
||||||
@ -1499,16 +1494,6 @@ export class HtmlVideoPlayer {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
updateSubtitleText(timeMs) {
|
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 allTrackEvents = [this.#currentTrackEvents, this.#currentSecondaryTrackEvents];
|
||||||
const subtitleTextElements = [this.#videoSubtitlesElem, this.#videoSecondarySubtitlesElem];
|
const subtitleTextElements = [this.#videoSubtitlesElem, this.#videoSecondarySubtitlesElem];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user