Title: [234051] trunk/Source/WebCore
Revision
234051
Author
[email protected]
Date
2018-07-20 10:29:40 -0700 (Fri, 20 Jul 2018)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234050 => 234051)


--- trunk/Source/WebCore/ChangeLog	2018-07-20 17:17:13 UTC (rev 234050)
+++ trunk/Source/WebCore/ChangeLog	2018-07-20 17:29:40 UTC (rev 234051)
@@ -1,3 +1,25 @@
+2018-07-20  Jer Noble  <[email protected]>
+
+        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):
+
 2018-07-20  Antoine Quint  <[email protected]>
 
         DeclarativeAnimation should suspend, resume, & stop m_eventQueue

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (234050 => 234051)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2018-07-20 17:17:13 UTC (rev 234050)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2018-07-20 17:29:40 UTC (rev 234051)
@@ -1096,7 +1096,7 @@
     }
 #endif
 
-#if PLATFORM(WATCHOS)
+#if HAVE(AVFOUNDATION_VIDEO_OUTPUT)
     createVideoOutput();
 #endif
 

Modified: trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (234050 => 234051)


--- trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm	2018-07-20 17:17:13 UTC (rev 234050)
+++ trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm	2018-07-20 17:29:40 UTC (rev 234051)
@@ -1668,9 +1668,12 @@
 
     WebAVPlayerLayer *playerLayer = (WebAVPlayerLayer *)[m_playerLayerView playerLayer];
 
-    [playerLayer setModelVideoLayerFrame:CGRectMake(0, 0, m_inlineRect.width(), m_inlineRect.height())];
+    auto modelVideoLayerFrame = CGRectMake(0, 0, m_inlineRect.width(), m_inlineRect.height());
+    [playerLayer setModelVideoLayerFrame:modelVideoLayerFrame];
     [playerLayer setVideoDimensions:[playerController() contentDimensions]];
     playerLayer.fullscreenInterface = this;
+    if (m_videoFullscreenModel)
+        m_videoFullscreenModel->setVideoLayerFrame(modelVideoLayerFrame);
 
     if (!m_playerViewController)
         m_playerViewController = adoptNS([[WebAVPlayerViewController alloc] initWithFullscreenInterface:this]);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to