Title: [187864] trunk/Source/WebCore
Revision
187864
Author
[email protected]
Date
2015-08-04 10:09:05 -0700 (Tue, 04 Aug 2015)

Log Message

Implement isPictureInPictureInterrupted.
https://bugs.webkit.org/show_bug.cgi?id=147620

Patch by Jeremy Jones <[email protected]> on 2015-08-04
Reviewed by Eric Carlson.

Implement isPictureInPictureInterrupted so setting the property to true pauses playback.
This allows PiP to pause when the device is locked while the app is suspended.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController init]):
(-[WebAVPlayerController isPictureInPictureInterrupted]):
(-[WebAVPlayerController setPictureInPictureInterrupted:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (187863 => 187864)


--- trunk/Source/WebCore/ChangeLog	2015-08-04 13:54:28 UTC (rev 187863)
+++ trunk/Source/WebCore/ChangeLog	2015-08-04 17:09:05 UTC (rev 187864)
@@ -1,3 +1,18 @@
+2015-08-04  Jeremy Jones  <[email protected]>
+
+        Implement isPictureInPictureInterrupted.
+        https://bugs.webkit.org/show_bug.cgi?id=147620
+
+        Reviewed by Eric Carlson.
+
+        Implement isPictureInPictureInterrupted so setting the property to true pauses playback.
+        This allows PiP to pause when the device is locked while the app is suspended.
+
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+        (-[WebAVPlayerController init]):
+        (-[WebAVPlayerController isPictureInPictureInterrupted]):
+        (-[WebAVPlayerController setPictureInPictureInterrupted:]):
+
 2015-08-03  Csaba Osztrogonác  <[email protected]>
 
         Introduce COMPILER(GCC_OR_CLANG) guard and make COMPILER(GCC) true only for GCC

Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (187863 => 187864)


--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm	2015-08-04 13:54:28 UTC (rev 187863)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm	2015-08-04 17:09:05 UTC (rev 187864)
@@ -84,6 +84,7 @@
 @interface WebAVPlayerController : NSObject <AVPlayerViewControllerDelegate> {
     WebAVMediaSelectionOption *_currentAudioMediaSelectionOption;
     WebAVMediaSelectionOption *_currentLegibleMediaSelectionOption;
+    BOOL _pictureInPictureInterrupted;
 }
 
 - (void)resetState;
@@ -139,6 +140,7 @@
     if (!(self = [super init]))
         return self;
     
+    _pictureInPictureInterrupted = NO;
     initAVPlayerController();
     self.playerControllerProxy = [[allocAVPlayerControllerInstance() init] autorelease];
     return self;
@@ -568,6 +570,21 @@
 {
     return self.fullscreenInterface->allowsPictureInPicturePlayback();
 }
+
+- (BOOL)isPictureInPictureInterrupted
+{
+    return _pictureInPictureInterrupted;
+}
+
+- (void)setPictureInPictureInterrupted:(BOOL)pictureInPictureInterrupted
+{
+    if (_pictureInPictureInterrupted != pictureInPictureInterrupted) {
+        _pictureInPictureInterrupted = pictureInPictureInterrupted;
+        if (pictureInPictureInterrupted)
+            [self setPlaying:NO];
+    }
+}
+
 @end
 
 @interface WebAVMediaSelectionOption : NSObject
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to