Changeset 231924 in webkit
- Timestamp:
- May 17, 2018 3:16:22 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r231923 r231924 1 2018-05-17 Jeremy Jones <jeremyj@apple.com> 2 3 Fullscreen to PiP results in exit fullscreen call failure 4 https://bugs.webkit.org/show_bug.cgi?id=185699 5 rdar://problem/40310291 6 7 Reviewed by Eric Carlson. 8 9 No new tests because no behavior change. 10 11 Prevent multiple exit fullscreen calls when transitioning from fullscreen to picture-in-picture. 12 13 * platform/ios/VideoFullscreenInterfaceAVKit.mm: 14 (-[WebAVPlayerViewControllerDelegate playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart:]): 15 Implement this to prevent AVKit from automatically initiating exit fullscreen on pip. 16 17 (VideoFullscreenInterfaceAVKit::didStartPictureInPicture): 18 Set the return to fullscreen flag here, since this is where exit fullscreen happens. 19 20 (VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): 21 Don't exit fullscreen here since it is already initiated in didStartPictureInPicture. 22 1 23 2018-05-17 Ryan Haddad <ryanhaddad@apple.com> 2 24 -
trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm
r230845 r231924 154 154 } 155 155 156 - (BOOL)playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart:(AVPlayerViewController *)playerViewController 157 { 158 UNUSED_PARAM(playerViewController); 159 return NO; 160 } 161 156 162 static VideoFullscreenInterfaceAVKit::ExitFullScreenReason convertToExitFullScreenReason(AVPlayerViewControllerExitFullScreenReason reason) 157 163 { … … 1443 1449 1444 1450 if (m_currentMode.hasFullscreen()) { 1445 if (![m_playerViewController pictureInPictureWasStartedWhenEnteringBackground]) { 1446 [[m_playerViewController view] layoutIfNeeded]; 1447 [m_playerViewController exitFullScreenAnimated:YES completionHandler:[protectedThis = makeRefPtr(this), this] (BOOL success, NSError *error) { 1448 exitFullscreenHandler(success, error); 1449 }]; 1450 } 1451 m_shouldReturnToFullscreenWhenStoppingPiP = YES; 1452 [[m_playerViewController view] layoutIfNeeded]; 1453 [m_playerViewController exitFullScreenAnimated:YES completionHandler:[protectedThis = makeRefPtr(this), this] (BOOL success, NSError *error) { 1454 exitFullscreenHandler(success, error); 1455 }]; 1451 1456 } else { 1452 1457 [m_window setHidden:YES]; … … 1546 1551 return true; 1547 1552 1548 if (reason == ExitFullScreenReason::PictureInPictureStarted) { 1549 m_shouldReturnToFullscreenWhenStoppingPiP = m_currentMode.hasMode(HTMLMediaElementEnums::VideoFullscreenModeStandard); 1550 dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this] () mutable { 1551 [m_playerViewController exitFullScreenAnimated:NO completionHandler:[protectedThis = WTFMove(protectedThis), this] (BOOL success, NSError *error) { 1552 exitFullscreenHandler(success, error); 1553 }]; 1554 }); 1553 if (reason == ExitFullScreenReason::PictureInPictureStarted) 1555 1554 return false; 1556 }1557 1555 1558 1556 if (playbackSessionModel() && (reason == ExitFullScreenReason::DoneButtonTapped || reason == ExitFullScreenReason::RemoteControlStopEventReceived))
Note: See TracChangeset
for help on using the changeset viewer.