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;