Skip to content

Commit

Permalink
Cherry-pick e021db3. rdar://125019855
Browse files Browse the repository at this point in the history
    REGRESSION (276177@main): LinearMediaPlayer controls briefly appear when entering element fullscreen
    https://bugs.webkit.org/show_bug.cgi?id=271251
    rdar://125019855

    Reviewed by Jer Noble.

    On platforms that support fullscreen standby, VideoPresentationInterface::setupFullscreen() is
    called (with `standby` set to true) when element fullscreen is activated for an element containing
    a <video> descendant. This prewarms the presentation interface so that's it's ready to enter
    picture-in-picture if requested.

    After 276177@main, this prewarming inserts a LMKPlayableViewController in the WKWebView's hierarchy.
    Even though the VC's root view's `hidden` property is set to YES, due to a bug in LinearMediaKit
    parts of the media controls remain visible for a brief period. To work around this bug, since
    visionOS does not support automatic picture-in-picture we can just disable support for fullscreen
    standby. This avoids calls to VideoPresentationInterface::setupFullscreen() when entering element
    fullscreen.

    * Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm:
    (WebKit::VideoPresentationManager::supportsVideoFullscreenStandby const):

    Canonical link: https://commits.webkit.org/276364@main

Identifier: 276246.6@safari-7619.1.6-branch
  • Loading branch information
aestes authored and MyahCobbs committed Mar 20, 2024
1 parent 70c2b26 commit fe24ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ static FloatRect inlineVideoFrame(HTMLVideoElement& element)

bool VideoPresentationManager::supportsVideoFullscreenStandby() const
{
#if PLATFORM(IOS_FAMILY)
#if PLATFORM(IOS_FAMILY) && !PLATFORM(VISION)
return true;
#else
return false;
Expand Down

0 comments on commit fe24ace

Please sign in to comment.