Skip to content

Commit

Permalink
Cherry-pick 0c7bb63. rdar://problem/109528876
Browse files Browse the repository at this point in the history
    [iOS] Auto-PiP on Yahoo.com may display black feed
    https://bugs.webkit.org/show_bug.cgi?id=257059
    rdar://109528876

    Reviewed by Eric Carlson.

    Auto-PiP (as opposed to an explicit PiP operation) works by creating a empty WebAVPlayerLayerView,
    and WebAVPlayerViewController, and returning YES from the
    -playerViewControllerShouldStartPictureInPictureFromInlineWhenEnteringBackground: delegate. However,
    auto-PiP will transfer the video view from the empty WebAVPlayerLayerView to the PiP window, and if
    the empty view doesn't have a video view, the resulting PiP window will be empty.

    * Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:
    (VideoFullscreenInterfaceAVKit::doSetup):

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

Identifier: 262728.1089@safari-7616.1.14.10-branch
  • Loading branch information
jernoble authored and rjepstein committed May 24, 2023
1 parent d58a337 commit 04d12df
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1312,10 +1312,10 @@ - (WTFLogChannel*)logChannel
m_playerLayerView = adoptNS([allocWebAVPlayerLayerViewInstance() init]);
[m_playerLayerView setHidden:[playerController() isExternalPlaybackActive]];
[m_playerLayerView setBackgroundColor:clearUIColor()];
[m_playerLayerView setVideoView:m_videoView.get()];

if (!m_currentMode.hasPictureInPicture() && !m_changingStandbyOnly) {
ALWAYS_LOG_IF_POSSIBLE(LOGIDENTIFIER, "Moving videoView to fullscreen WebAVPlayerLayerView");
[m_playerLayerView setVideoView:m_videoView.get()];
[m_playerLayerView addSubview:m_videoView.get()];
}

Expand Down

0 comments on commit 04d12df

Please sign in to comment.