mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix: don't set temp variable
This commit is contained in:
parent
2caa2851b9
commit
032d03d201
1 changed files with 1 additions and 13 deletions
|
@ -245,12 +245,6 @@ function tryRemoveElement(elem) {
|
||||||
* @type {any | null | undefined}
|
* @type {any | null | undefined}
|
||||||
*/
|
*/
|
||||||
#currentSecondaryTrackEvents;
|
#currentSecondaryTrackEvents;
|
||||||
/**
|
|
||||||
* Used to temporarily store the text track when
|
|
||||||
* force-clearing the `activeCue` for certain browsers
|
|
||||||
* @type {TextTrack | null | undefined}
|
|
||||||
*/
|
|
||||||
#currentTextTrack;
|
|
||||||
/**
|
/**
|
||||||
* @type {string[] | undefined}
|
* @type {string[] | undefined}
|
||||||
*/
|
*/
|
||||||
|
@ -650,19 +644,13 @@ function tryRemoveElement(elem) {
|
||||||
* Forces the active cue to clear by disabling then re-enabling the track.
|
* Forces the active cue to clear by disabling then re-enabling the track.
|
||||||
* The track mode is reverted inside of a 0ms timeout to free up the track
|
* The track mode is reverted inside of a 0ms timeout to free up the track
|
||||||
* and allow it to disable and clear the active cue.
|
* and allow it to disable and clear the active cue.
|
||||||
* The track needs to be temporarily stored in order for us to access it
|
|
||||||
* inside the timeout. The stored value is reset after it is used.
|
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
forceClearTextTrackActiveCues(currentTrack) {
|
forceClearTextTrackActiveCues(currentTrack) {
|
||||||
if (currentTrack.activeCues) {
|
if (currentTrack.activeCues) {
|
||||||
this.#currentTextTrack = currentTrack;
|
|
||||||
currentTrack.mode = 'disabled';
|
currentTrack.mode = 'disabled';
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.#currentTextTrack) {
|
currentTrack.mode = 'showing';
|
||||||
this.#currentTextTrack.mode = 'showing';
|
|
||||||
this.#currentTextTrack = null;
|
|
||||||
}
|
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue