Changeset 234051 in webkit


Ignore:
Timestamp:
Jul 20, 2018 10:29:40 AM (6 years ago)
Author:
jer.noble@apple.com
Message:

First Auto-PiP from Fullscreen too small & animation blocks
https://bugs.webkit.org/show_bug.cgi?id=187745
<rdar://problem/42316583>

Reviewed by Jon Lee.

1) When Auto-PiPing, we don't have the luxury of setting up the fullscreen state
ahead of time; we get notified that PiP has already started. The area of the code
which does this just-in-time setup needs to set the video layer's frame so that the
transform within the PiP window is correct.

2) We generate a placeholder image when going into fullscreen, but we need to do
so synchronously. Create the AVPlayerItemVideoOutput up front at AVPlayerItem creation
time wherever AVPIVO is available.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(VideoFullscreenInterfaceAVKit::doSetup):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r234049 r234051  
     12018-07-20  Jer Noble  <jer.noble@apple.com>
     2
     3        First Auto-PiP from Fullscreen too small & animation blocks
     4        https://bugs.webkit.org/show_bug.cgi?id=187745
     5        <rdar://problem/42316583>
     6
     7        Reviewed by Jon Lee.
     8
     9        1) When Auto-PiPing, we don't have the luxury of setting up the fullscreen state
     10        ahead of time; we get notified that PiP has already started. The area of the code
     11        which does this just-in-time setup needs to set the video layer's frame so that the
     12        transform within the PiP window is correct.
     13
     14        2) We generate a placeholder image when going into fullscreen, but we need to do
     15        so synchronously. Create the AVPlayerItemVideoOutput up front at AVPlayerItem creation
     16        time wherever AVPIVO is available.
     17
     18        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     19        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
     20        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
     21        (VideoFullscreenInterfaceAVKit::doSetup):
     22
    1232018-07-20  Antoine Quint  <graouts@apple.com>
    224
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r233501 r234051  
    10971097#endif
    10981098
    1099 #if PLATFORM(WATCHOS)
     1099#if HAVE(AVFOUNDATION_VIDEO_OUTPUT)
    11001100    createVideoOutput();
    11011101#endif
  • trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm

    r234044 r234051  
    16691669    WebAVPlayerLayer *playerLayer = (WebAVPlayerLayer *)[m_playerLayerView playerLayer];
    16701670
    1671     [playerLayer setModelVideoLayerFrame:CGRectMake(0, 0, m_inlineRect.width(), m_inlineRect.height())];
     1671    auto modelVideoLayerFrame = CGRectMake(0, 0, m_inlineRect.width(), m_inlineRect.height());
     1672    [playerLayer setModelVideoLayerFrame:modelVideoLayerFrame];
    16721673    [playerLayer setVideoDimensions:[playerController() contentDimensions]];
    16731674    playerLayer.fullscreenInterface = this;
     1675    if (m_videoFullscreenModel)
     1676        m_videoFullscreenModel->setVideoLayerFrame(modelVideoLayerFrame);
    16741677
    16751678    if (!m_playerViewController)
Note: See TracChangeset for help on using the changeset viewer.