Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[visionOS] Video briefly resizes to full-window when entering LinearM…
…ediaPlayer fullscreen https://bugs.webkit.org/show_bug.cgi?id=271032 rdar://123315074 Reviewed by Jer Noble. Prior to this change, VideoPresentationInterfaceIOS would create a new UIWindow in which the player view controller would be presented. However, LinearMediaKit would immediately hide this window and present the fullscreen video in a new UIScene. When entering LinearMediaPlayer fullscreen, this resulted in the UIWindow briefly appearing then being hidden prior to the LinearMediaKit scene being presented. To avoid this, skip creating the UIWindow for LinearMediaPlayer fullscreen. Instead, embed the LMPlayableViewController in WKWebView's presenting view controller with its root view sized to match the inline video element. Then, allow LinearMediaKit to hide the WKWebView's UIWindowScene and present its own scene. This results in a less flashy, more direct transition from inline to fullscreen. * Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.h: (WebCore::VideoPresentationInterfaceIOS::hasMode const): (WebCore::VideoPresentationInterfaceIOS::fullscreenViewController const): * Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm: (WebCore::VideoPresentationInterfaceIOS::presentingViewController): (WebCore::VideoPresentationInterfaceIOS::doSetup): (WebCore::VideoPresentationInterfaceIOS::cleanupFullscreen): Canonical link: https://commits.webkit.org/276177@main
- Loading branch information