mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Move backdrop transparency method to component
This commit is contained in:
parent
3d11cbcd8f
commit
125d5cb015
6 changed files with 54 additions and 30 deletions
|
@ -30,6 +30,7 @@ import globalize from '../../scripts/globalize';
|
|||
import ServerConnections from '../../components/ServerConnections';
|
||||
import profileBuilder from '../../scripts/browserDeviceProfile';
|
||||
import { getIncludeCorsCredentials } from '../../scripts/settings/webSettings';
|
||||
import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../components/backdrop/backdrop';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -691,7 +692,7 @@ function tryRemoveElement(elem) {
|
|||
destroyHlsPlayer(this);
|
||||
destroyFlvPlayer(this);
|
||||
|
||||
appRouter.setTransparency('none');
|
||||
setBackdropTransparency(TRANSPARENCY_LEVEL.None);
|
||||
document.body.classList.remove('hide-scroll');
|
||||
|
||||
const videoElement = this.#mediaElement;
|
||||
|
@ -838,7 +839,7 @@ function tryRemoveElement(elem) {
|
|||
if (this._currentPlayOptions.fullscreen) {
|
||||
appRouter.showVideoOsd().then(this.onNavigatedToOsd);
|
||||
} else {
|
||||
appRouter.setTransparency('backdrop');
|
||||
setBackdropTransparency(TRANSPARENCY_LEVEL.Backdrop);
|
||||
this.#videoDialog.classList.remove('videoPlayerContainer-onTop');
|
||||
|
||||
this.onStartedAndNavigatedToOsd();
|
||||
|
|
|
@ -2,6 +2,7 @@ import { Events } from 'jellyfin-apiclient';
|
|||
import browser from '../../scripts/browser';
|
||||
import { appRouter } from '../../components/appRouter';
|
||||
import loading from '../../components/loading/loading';
|
||||
import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../components/backdrop/backdrop';
|
||||
|
||||
/* globals YT */
|
||||
|
||||
|
@ -127,7 +128,7 @@ function onPlaying(instance, playOptions, resolve) {
|
|||
instance.videoDialog.classList.remove('onTop');
|
||||
});
|
||||
} else {
|
||||
appRouter.setTransparency('backdrop');
|
||||
setBackdropTransparency(TRANSPARENCY_LEVEL.Backdrop);
|
||||
instance.videoDialog.classList.remove('onTop');
|
||||
}
|
||||
|
||||
|
@ -227,7 +228,7 @@ class YoutubePlayer {
|
|||
return Promise.resolve();
|
||||
}
|
||||
destroy() {
|
||||
appRouter.setTransparency('none');
|
||||
setBackdropTransparency(TRANSPARENCY_LEVEL.None);
|
||||
document.body.classList.remove('hide-scroll');
|
||||
|
||||
const dlg = this.videoDialog;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue