Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Re-enable iOS and iPadOS fullscreen #266

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Frontend/ui-library/src/Application/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion Frontend/ui-library/src/UI/FullscreenIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ declare global {
*/
export class FullScreenIconBase {
isFullscreen = false;
fullscreenElement: HTMLElement;
fullscreenElement: HTMLElement | HTMLVideoElement;

_rootElement: HTMLElement;

Expand Down