From d5f9a24efa0abc18d25289b7ab6d31d18785667e Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Fri, 14 Nov 2025 23:26:20 +0100 Subject: [PATCH] Fix player controls clipping in resizable iPad windows When playing video fullscreen in a resizable window on iPad, the player height was being forced to UIScreen.main.bounds.size.height, which is the full screen size. In resizable windows, this caused the player container to extend beyond the visible window bounds, clipping controls at the bottom. Now on iPad, the player uses natural geometry provided by its container which respects actual window bounds, while iPhone continues using screen-based calculation for proper fullscreen behavior. --- Shared/Player/VideoPlayerView.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Shared/Player/VideoPlayerView.swift b/Shared/Player/VideoPlayerView.swift index a682ee8f..e9811650 100644 --- a/Shared/Player/VideoPlayerView.swift +++ b/Shared/Player/VideoPlayerView.swift @@ -241,6 +241,13 @@ struct VideoPlayerView: View { } var playerHeight: Double? { + // On iPad, don't force a specific height in fullscreen mode + // This allows the player to properly fit within resizable windows + if UIDevice.current.userInterfaceIdiom == .pad { + return nil + } + + // For iPhone, use screen bounds to ensure proper fullscreen sizing let lockedPortrait = player.lockedOrientation?.contains(.portrait) ?? false let isPortrait = OrientationTracker.shared.currentInterfaceOrientation.isPortrait || lockedPortrait return fullScreenPlayer ? UIScreen.main.bounds.size.height - (isPortrait ? safeAreaModel.safeArea.top + safeAreaModel.safeArea.bottom : 0) : nil