Move backdrop transparency method to component

This commit is contained in:
Bill Thornton 2022-04-12 16:22:00 -04:00
parent 3d11cbcd8f
commit 125d5cb015
6 changed files with 54 additions and 30 deletions

View file

@ -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();