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

Merge pull request #2781 from imchasingshadows/bugfix/web0s-fullscreen

bugfix/web0s-fullscreen
This commit is contained in:
Bill Thornton 2021-09-17 14:05:30 -04:00 committed by GitHub
commit 33e7ac96b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 13 deletions

View file

@ -1361,24 +1361,41 @@ function tryRemoveElement(elem) {
this.#videoDialog = dlg;
this.#mediaElement = videoElement;
delete this.forcedFullscreen;
if (options.fullscreen) {
// At this point, we must hide the scrollbar placeholder, so it's not being displayed while the item is being loaded
document.body.classList.add('hide-scroll');
// Enter fullscreen in the webOS browser to hide the top bar
if (!window.NativeShell && browser.web0s && Screenfull.isEnabled) {
Screenfull.request().then(() => {
this.forcedFullscreen = true;
});
return videoElement;
}
// don't animate on smart tv's, too slow
if (!browser.slow && browser.supportsCssAnimation()) {
return zoomIn(dlg).then(function () {
return videoElement;
});
}
}
// don't animate on smart tv's, too slow
if (options.fullscreen && browser.supportsCssAnimation() && !browser.slow) {
return zoomIn(dlg).then(function () {
return videoElement;
});
} else {
return videoElement;
}
return videoElement;
});
} else {
// we need to hide scrollbar when starting playback from page with animated background
if (options.fullscreen) {
// we need to hide scrollbar when starting playback from page with animated background
document.body.classList.add('hide-scroll');
// Enter fullscreen in the webOS browser to hide the top bar
if (!this.forcedFullscreen && !window.NativeShell && browser.web0s && Screenfull.isEnabled) {
Screenfull.request().then(() => {
this.forcedFullscreen = true;
});
}
}
return Promise.resolve(dlg.querySelector('video'));