1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

chore: rename renderer var

This commit is contained in:
ThaUnknown 2023-04-18 21:13:04 +02:00
parent 1cfd4f6b3e
commit f4aa6e1737

View file

@ -209,7 +209,7 @@ function tryRemoveElement(elem) {
/** /**
* @type {any | null | undefined} * @type {any | null | undefined}
*/ */
#currentJASSUB; #currentAssRenderer;
/** /**
* @type {null | undefined} * @type {null | undefined}
*/ */
@ -585,9 +585,9 @@ function tryRemoveElement(elem) {
const offsetValue = parseFloat(offset); const offsetValue = parseFloat(offset);
// if .ass currently rendering // if .ass currently rendering
if (this.#currentJASSUB) { if (this.#currentAssRenderer) {
this.updateCurrentTrackOffset(offsetValue); this.updateCurrentTrackOffset(offsetValue);
this.#currentJASSUB.timeOffset = (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000 + offsetValue; this.#currentAssRenderer.timeOffset = (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000 + offsetValue;
} else { } else {
const trackElements = this.getTextTracks(); const trackElements = this.getTextTracks();
// if .vtt currently rendering // if .vtt currently rendering
@ -978,8 +978,8 @@ function tryRemoveElement(elem) {
loading.hide(); loading.hide();
seekOnPlaybackStart(this, e.target, this._currentPlayOptions.playerStartPositionTicks, () => { seekOnPlaybackStart(this, e.target, this._currentPlayOptions.playerStartPositionTicks, () => {
if (this.#currentJASSUB) { if (this.#currentAssRenderer) {
this.#currentJASSUB.timeOffset = (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000 + this.#currentTrackOffset; this.#currentAssRenderer.timeOffset = (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000 + this.#currentTrackOffset;
} }
}); });
@ -1167,11 +1167,11 @@ function tryRemoveElement(elem) {
this.#currentClock = null; this.#currentClock = null;
this._currentAspectRatio = null; this._currentAspectRatio = null;
const jassub = this.#currentJASSUB; const jassub = this.#currentAssRenderer;
if (jassub) { if (jassub) {
jassub.destroy(); jassub.destroy();
} }
this.#currentJASSUB = null; this.#currentAssRenderer = null;
const renderer = this.#currentAssRenderer; const renderer = this.#currentAssRenderer;
if (renderer) { if (renderer) {
@ -1305,8 +1305,8 @@ function tryRemoveElement(elem) {
options.legacyWorkerUrl = legacyWorkerUrl; options.legacyWorkerUrl = legacyWorkerUrl;
const cleanup = () => { const cleanup = () => {
this.#currentJASSUB.destroy(); this.#currentAssRenderer.destroy();
this.#currentJASSUB = null; this.#currentAssRenderer = null;
onErrorInternal(this, 'mediadecodeerror'); onErrorInternal(this, 'mediadecodeerror');
}; };
@ -1318,12 +1318,12 @@ function tryRemoveElement(elem) {
}); });
avaliableFonts.push(fontUrl); avaliableFonts.push(fontUrl);
}); });
this.#currentJASSUB = new JASSUB(options); this.#currentAssRenderer = new JASSUB(options);
this.#currentJASSUB.addEventListener('error', cleanup, { once: true }); this.#currentAssRenderer.addEventListener('error', cleanup, { once: true });
}); });
} else { } else {
this.#currentJASSUB = new JASSUB(options); this.#currentAssRenderer = new JASSUB(options);
this.#currentJASSUB.addEventListener('error', cleanup, { once: true }); this.#currentAssRenderer.addEventListener('error', cleanup, { once: true });
} }
}); });
}); });