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

Merge pull request #1951 from dmitrylyzo/fix-theme-video

Fix theme video (animated backdrops)
This commit is contained in:
dkanada 2020-09-30 04:05:05 +09:00 committed by GitHub
commit 761d6782dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,6 @@ function tryRemoveElement(elem) {
return new Promise(resolve => { return new Promise(resolve => {
const duration = 240; const duration = 240;
elem.style.animation = `htmlvideoplayer-zoomin ${duration}ms ease-in normal`; elem.style.animation = `htmlvideoplayer-zoomin ${duration}ms ease-in normal`;
hidePrePlaybackPage();
dom.addEventListener(elem, dom.whichAnimationEvent(), resolve, { dom.addEventListener(elem, dom.whichAnimationEvent(), resolve, {
once: true once: true
}); });
@ -1328,17 +1327,24 @@ function tryRemoveElement(elem) {
this.#videoDialog = dlg; this.#videoDialog = dlg;
this.#mediaElement = videoElement; this.#mediaElement = videoElement;
if (options.fullscreen) {
hidePrePlaybackPage();
}
// don't animate on smart tv's, too slow // don't animate on smart tv's, too slow
if (options.fullscreen && browser.supportsCssAnimation() && !browser.slow) { if (options.fullscreen && browser.supportsCssAnimation() && !browser.slow) {
return zoomIn(dlg).then(function () { return zoomIn(dlg).then(function () {
return videoElement; return videoElement;
}); });
} else { } else {
hidePrePlaybackPage();
return videoElement; return videoElement;
} }
}); });
} else { } else {
if (options.fullscreen) {
hidePrePlaybackPage();
}
return Promise.resolve(dlg.querySelector('video')); return Promise.resolve(dlg.querySelector('video'));
} }
} }