mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix: implement forced fullscreen hack for webos
This commit is contained in:
parent
7f81f5b3f1
commit
59bb2f27a5
2 changed files with 9 additions and 5 deletions
|
@ -403,7 +403,7 @@ import { appRouter } from '../../../components/appRouter';
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFullscreenChanged() {
|
function onFullscreenChanged() {
|
||||||
if (!playbackManager.isFullscreen(currentPlayer)) {
|
if (currentPlayer.forcedFullscreen && !playbackManager.isFullscreen(currentPlayer)) {
|
||||||
appRouter.back();
|
appRouter.back();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1361,25 +1361,29 @@ function tryRemoveElement(elem) {
|
||||||
this.#videoDialog = dlg;
|
this.#videoDialog = dlg;
|
||||||
this.#mediaElement = videoElement;
|
this.#mediaElement = videoElement;
|
||||||
|
|
||||||
|
delete this.forcedFullscreen;
|
||||||
|
|
||||||
if (options.fullscreen) {
|
if (options.fullscreen) {
|
||||||
// At this point, we must hide the scrollbar placeholder, so it's not being displayed while the item is being loaded
|
// 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');
|
document.body.classList.add('hide-scroll');
|
||||||
}
|
|
||||||
|
|
||||||
if (options.fullscreen) {
|
// Enter fullscreen in the webOS browser to hide the top bar
|
||||||
if (!window.NativeShell && browser.web0s && Screenfull.isEnabled) {
|
if (!window.NativeShell && browser.web0s && Screenfull.isEnabled) {
|
||||||
Screenfull.request();
|
Screenfull.request().then(() => {
|
||||||
|
this.forcedFullscreen = true;
|
||||||
|
});
|
||||||
return videoElement;
|
return videoElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't animate on smart tv's, too slow
|
// don't animate on smart tv's, too slow
|
||||||
if (!browser.slow && browser.supportsCssAnimation()) {
|
if (!browser.slow && browser.supportsCssAnimation()) {
|
||||||
return zoomIn(dlg).then(function () {
|
return zoomIn(dlg).then(function () {
|
||||||
return videoElement;
|
return videoElement;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return videoElement;
|
return videoElement;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue