mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix: eslint no-shadow errors
This commit is contained in:
parent
6a93a2eb29
commit
832b9eaf4d
30 changed files with 273 additions and 271 deletions
|
@ -980,9 +980,9 @@ class ChromecastPlayer {
|
|||
|
||||
const instance = this;
|
||||
|
||||
apiClient.getItem(userId, item.Id).then(function (item) {
|
||||
apiClient.getItem(userId, item.Id).then(function (fetchedItem) {
|
||||
instance.playWithCommand({
|
||||
items: [item]
|
||||
items: [fetchedItem]
|
||||
}, 'Shuffle');
|
||||
});
|
||||
}
|
||||
|
@ -993,9 +993,9 @@ class ChromecastPlayer {
|
|||
|
||||
const instance = this;
|
||||
|
||||
apiClient.getItem(userId, item.Id).then(function (item) {
|
||||
apiClient.getItem(userId, item.Id).then(function (fetchedItem) {
|
||||
instance.playWithCommand({
|
||||
items: [item]
|
||||
items: [fetchedItem]
|
||||
}, 'InstantMix');
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1346,13 +1346,13 @@ function tryRemoveElement(elem) {
|
|||
return import('./style.scss').then(() => {
|
||||
loading.show();
|
||||
|
||||
const dlg = document.createElement('div');
|
||||
dlg.setAttribute('dir', 'ltr');
|
||||
const newdlg = document.createElement('div');
|
||||
newdlg.setAttribute('dir', 'ltr');
|
||||
|
||||
dlg.classList.add('videoPlayerContainer');
|
||||
newdlg.classList.add('videoPlayerContainer');
|
||||
|
||||
if (options.fullscreen) {
|
||||
dlg.classList.add('videoPlayerContainer-onTop');
|
||||
newdlg.classList.add('videoPlayerContainer-onTop');
|
||||
}
|
||||
|
||||
let html = '';
|
||||
|
@ -1371,8 +1371,8 @@ function tryRemoveElement(elem) {
|
|||
|
||||
html += '</video>';
|
||||
|
||||
dlg.innerHTML = html;
|
||||
const videoElement = dlg.querySelector('video');
|
||||
newdlg.innerHTML = html;
|
||||
const videoElement = newdlg.querySelector('video');
|
||||
|
||||
videoElement.volume = getSavedVolume();
|
||||
videoElement.addEventListener('timeupdate', this.onTimeUpdate);
|
||||
|
@ -1388,8 +1388,8 @@ function tryRemoveElement(elem) {
|
|||
videoElement.poster = options.backdropUrl;
|
||||
}
|
||||
|
||||
document.body.insertBefore(dlg, document.body.firstChild);
|
||||
this.#videoDialog = dlg;
|
||||
document.body.insertBefore(newdlg, document.body.firstChild);
|
||||
this.#videoDialog = newdlg;
|
||||
this.#mediaElement = videoElement;
|
||||
|
||||
delete this.forcedFullscreen;
|
||||
|
@ -1408,7 +1408,7 @@ function tryRemoveElement(elem) {
|
|||
|
||||
// don't animate on smart tv's, too slow
|
||||
if (!browser.slow && browser.supportsCssAnimation()) {
|
||||
return zoomIn(dlg).then(function () {
|
||||
return zoomIn(newdlg).then(function () {
|
||||
return videoElement;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -32,26 +32,26 @@ function createMediaElement(instance, options) {
|
|||
import('./style.scss').then(() => {
|
||||
loading.show();
|
||||
|
||||
const dlg = document.createElement('div');
|
||||
const newdlg = document.createElement('div');
|
||||
|
||||
dlg.classList.add('youtubePlayerContainer');
|
||||
newdlg.classList.add('youtubePlayerContainer');
|
||||
|
||||
if (options.fullscreen) {
|
||||
dlg.classList.add('onTop');
|
||||
newdlg.classList.add('onTop');
|
||||
}
|
||||
|
||||
dlg.innerHTML = '<div id="player"></div>';
|
||||
const videoElement = dlg.querySelector('#player');
|
||||
newdlg.innerHTML = '<div id="player"></div>';
|
||||
const videoElement = newdlg.querySelector('#player');
|
||||
|
||||
document.body.insertBefore(dlg, document.body.firstChild);
|
||||
instance.videoDialog = dlg;
|
||||
document.body.insertBefore(newdlg, document.body.firstChild);
|
||||
instance.videoDialog = newdlg;
|
||||
|
||||
if (options.fullscreen) {
|
||||
document.body.classList.add('hide-scroll');
|
||||
}
|
||||
|
||||
if (options.fullscreen && dlg.animate && !browser.slow) {
|
||||
zoomIn(dlg, 1).onfinish = function () {
|
||||
if (options.fullscreen && newdlg.animate && !browser.slow) {
|
||||
zoomIn(newdlg, 1).onfinish = function () {
|
||||
resolve(videoElement);
|
||||
};
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue