From 5811f32d1c0bfd88e4fa0181cfb464cfc0fdcd08 Mon Sep 17 00:00:00 2001 From: William Belcher Date: Mon, 12 Jun 2023 16:44:05 +1000 Subject: [PATCH] =?UTF-8?q?Re-enable=20iOS=20and=20iPadOS=20fullscreen.=20?= =?UTF-8?q?Additionaly,=20only=20use=20the=20native=E2=80=A6=20=E2=80=A6?= =?UTF-8?q?=20webplayer=20in=20iOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/ui-library/src/Application/Application.ts | 4 +++- Frontend/ui-library/src/UI/FullscreenIcon.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Frontend/ui-library/src/Application/Application.ts b/Frontend/ui-library/src/Application/Application.ts index f886192f..f27154fa 100644 --- a/Frontend/ui-library/src/Application/Application.ts +++ b/Frontend/ui-library/src/Application/Application.ts @@ -194,7 +194,9 @@ export class Application { ? new FullScreenIconExternal(this._options.fullScreenControlsConfig.customElement) // Or use the one created by the Controls initializer earlier : controls.fullscreenIcon; - if (fullScreenButton) fullScreenButton.fullscreenElement = this.rootElement; + if (fullScreenButton) { + fullScreenButton.fullscreenElement = /iPhone|iPod/.test(navigator.userAgent) ? this.stream.videoElementParent.getElementsByTagName("video")[0] : this.rootElement; + } // Add settings button to controls const settingsButton : HTMLElement | undefined = diff --git a/Frontend/ui-library/src/UI/FullscreenIcon.ts b/Frontend/ui-library/src/UI/FullscreenIcon.ts index 7f21d6de..fba0ffc4 100644 --- a/Frontend/ui-library/src/UI/FullscreenIcon.ts +++ b/Frontend/ui-library/src/UI/FullscreenIcon.ts @@ -30,7 +30,7 @@ declare global { */ export class FullScreenIconBase { isFullscreen = false; - fullscreenElement: HTMLElement; + fullscreenElement: HTMLElement | HTMLVideoElement; _rootElement: HTMLElement;