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

Merge pull request #4775 from thornbill/unused-privates

This commit is contained in:
Bill Thornton 2023-09-14 17:37:16 -04:00 committed by GitHub
commit 2c1167c193
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 75 additions and 87 deletions

View file

@ -65,6 +65,7 @@ module.exports = {
'no-trailing-spaces': ['error'], 'no-trailing-spaces': ['error'],
'no-unused-expressions': ['off'], 'no-unused-expressions': ['off'],
'@typescript-eslint/no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true, 'allowTaggedTemplates': true }], '@typescript-eslint/no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true, 'allowTaggedTemplates': true }],
'no-unused-private-class-members': ['error'],
'no-useless-constructor': ['off'], 'no-useless-constructor': ['off'],
'@typescript-eslint/no-useless-constructor': ['error'], '@typescript-eslint/no-useless-constructor': ['error'],
'no-var': ['error'], 'no-var': ['error'],

View file

@ -129,22 +129,6 @@ class PluginManager {
.sort((p1, p2) => (p1.priority || 0) - (p2.priority || 0))[0]; .sort((p1, p2) => (p1.priority || 0) - (p2.priority || 0))[0];
} }
#mapRoute(plugin, route) {
if (typeof plugin === 'string') {
plugin = this.pluginsList.filter((p) => {
return (p.id || p.packageName) === plugin;
})[0];
}
route = route.path || route;
if (route.toLowerCase().startsWith('http')) {
return route;
}
return '/plugins/' + plugin.id + '/' + route;
}
mapPath(plugin, path, addCacheParam) { mapPath(plugin, path, addCacheParam) {
if (typeof plugin === 'string') { if (typeof plugin === 'string') {
plugin = this.pluginsList.filter((p) => { plugin = this.pluginsList.filter((p) => {

View file

@ -169,137 +169,140 @@ const SECONDARY_TEXT_TRACK_INDEX = 1;
export class HtmlVideoPlayer { export class HtmlVideoPlayer {
/** /**
* @type {string} * @type {string}
*/ */
name; name;
/** /**
* @type {string} * @type {string}
*/ */
type = PluginType.MediaPlayer; type = PluginType.MediaPlayer;
/** /**
* @type {string} * @type {string}
*/ */
id = 'htmlvideoplayer'; id = 'htmlvideoplayer';
/** /**
* Let any players created by plugins take priority * Let any players created by plugins take priority
* *
* @type {number} * @type {number}
*/ */
priority = 1; priority = 1;
/** /**
* @type {boolean} * @type {boolean}
*/ */
isFetching = false; isFetching = false;
/** /**
* @type {HTMLDivElement | null | undefined} * @type {HTMLDivElement | null | undefined}
*/ */
#videoDialog; #videoDialog;
/** /**
* @type {number | undefined} * @type {number | undefined}
*/ */
#subtitleTrackIndexToSetOnPlaying; #subtitleTrackIndexToSetOnPlaying;
/** /**
* @type {number | undefined} * @type {number | undefined}
*/ */
#secondarySubtitleTrackIndexToSetOnPlaying; #secondarySubtitleTrackIndexToSetOnPlaying;
/** /**
* @type {number | null} * @type {number | null}
*/ */
#audioTrackIndexToSetOnPlaying; #audioTrackIndexToSetOnPlaying;
/** /**
* @type {null | undefined} * @type {null | undefined}
*/ */
#currentClock; #currentClock;
/** /**
* @type {any | null | undefined} * @type {any | null | undefined}
*/ */
#currentAssRenderer; #currentAssRenderer;
/** /**
* @type {null | undefined} * @type {null | undefined}
*/ */
#customTrackIndex; #customTrackIndex;
/** /**
* @type {number | undefined} * @type {number | undefined}
*/ */
#customSecondaryTrackIndex; #customSecondaryTrackIndex;
/** /**
* @type {boolean | undefined} * @type {boolean | undefined}
*/ */
#showTrackOffset; #showTrackOffset;
/** /**
* @type {number | undefined} * @type {number | undefined}
*/ */
#currentTrackOffset; #currentTrackOffset;
/** /**
* @type {HTMLElement | null | undefined} * @type {HTMLElement | null | undefined}
*/ */
#secondaryTrackOffset; #secondaryTrackOffset;
/** /**
* @type {HTMLElement | null | undefined} * @type {HTMLElement | null | undefined}
*/ */
#videoSubtitlesElem; #videoSubtitlesElem;
/** /**
* @type {HTMLElement | null | undefined} * @type {HTMLElement | null | undefined}
*/ */
#videoSecondarySubtitlesElem; #videoSecondarySubtitlesElem;
/** /**
* @type {any | null | undefined} * @type {any | null | undefined}
*/ */
#currentTrackEvents; #currentTrackEvents;
/** /**
* @type {any | null | undefined} * @type {any | null | undefined}
*/ */
#currentSecondaryTrackEvents; #currentSecondaryTrackEvents;
/** /**
* @type {string[] | undefined} * @type {string[] | undefined}
*/ */
#supportedFeatures; #supportedFeatures;
/** /**
* @type {HTMLVideoElement | null | undefined} * @type {HTMLVideoElement | null | undefined}
*/ */
#mediaElement; #mediaElement;
/** /**
* @type {number} * @type {number}
*/ */
#fetchQueue = 0; #fetchQueue = 0;
/** /**
* @type {string | undefined} * @type {string | undefined}
*/ */
#currentSrc; #currentSrc;
/** /**
* @type {boolean | undefined} * @type {boolean | undefined}
*/ */
#started; #started;
/** /**
* @type {boolean | undefined} * @type {boolean | undefined}
*/ */
#timeUpdated; #timeUpdated;
/** /**
* @type {number | null | undefined} * @type {number | null | undefined}
*/ */
#currentTime; #currentTime;
/** /**
* @type {any | undefined} * @private (used in other files)
*/ * @type {any | undefined}
#flvPlayer; */
_flvPlayer;
/** /**
* @private (used in other files) * @private (used in other files)
* @type {any | undefined} * @type {any | undefined}
*/ */
_hlsPlayer; _hlsPlayer;
/** /**
* @private (used in other files) * @private (used in other files)
* @type {any | null | undefined} * @type {any | null | undefined}
*/ */
_castPlayer; _castPlayer;
/** /**
* @private (used in other files) * @private (used in other files)
* @type {any | undefined} * @type {any | undefined}
*/ */
_currentPlayOptions; _currentPlayOptions;
/** /**
* @type {any | undefined} * @type {any | undefined}
*/ */
#lastProfile; #lastProfile;
constructor() { constructor() {
@ -407,7 +410,7 @@ export class HtmlVideoPlayer {
flvPlayer.attachMediaElement(elem); flvPlayer.attachMediaElement(elem);
flvPlayer.load(); flvPlayer.load();
this.#flvPlayer = flvPlayer; this._flvPlayer = flvPlayer;
// This is needed in setCurrentTrackElement // This is needed in setCurrentTrackElement
this.#currentSrc = url; this.#currentSrc = url;