fix: do not repeat fullscreen hack if already set

This commit is contained in:
Kay Simons 2021-09-16 17:59:37 +02:00
parent 2e66ce13e6
commit 118f9e1920

View file

@ -1389,6 +1389,13 @@ function tryRemoveElement(elem) {
// we need to hide scrollbar when starting playback from page with animated background
if (options.fullscreen) {
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'));