Title: [249009] branches/safari-608-branch/Source/WebCore
Revision
249009
Author
[email protected]
Date
2019-08-22 08:45:31 -0700 (Thu, 22 Aug 2019)

Log Message

Cherry-pick r248978. rdar://problem/54579627

    Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
    https://bugs.webkit.org/show_bug.cgi?id=200992
    <rdar://problem/54408993>

    Reviewed by Eric Carlson.

    Follow-up to r248962: When the active audio route changes, and the
    system instructs us to pause, only pause the currently audible sessions.

    * platform/audio/ios/MediaSessionManagerIOS.h:
    * platform/audio/ios/MediaSessionManagerIOS.mm:
    (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange):
    (-[WebMediaSessionHelper activeAudioRouteDidChange:]):
    (WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248978 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (249008 => 249009)


--- branches/safari-608-branch/Source/WebCore/ChangeLog	2019-08-22 15:45:26 UTC (rev 249008)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog	2019-08-22 15:45:31 UTC (rev 249009)
@@ -1,5 +1,44 @@
 2019-08-21  Kocsen Chung  <[email protected]>
 
+        Cherry-pick r248978. rdar://problem/54579627
+
+    Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
+    https://bugs.webkit.org/show_bug.cgi?id=200992
+    <rdar://problem/54408993>
+    
+    Reviewed by Eric Carlson.
+    
+    Follow-up to r248962: When the active audio route changes, and the
+    system instructs us to pause, only pause the currently audible sessions.
+    
+    * platform/audio/ios/MediaSessionManagerIOS.h:
+    * platform/audio/ios/MediaSessionManagerIOS.mm:
+    (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange):
+    (-[WebMediaSessionHelper activeAudioRouteDidChange:]):
+    (WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-21  Jer Noble  <[email protected]>
+
+            Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
+            https://bugs.webkit.org/show_bug.cgi?id=200992
+            <rdar://problem/54408993>
+
+            Reviewed by Eric Carlson.
+
+            Follow-up to r248962: When the active audio route changes, and the
+            system instructs us to pause, only pause the currently audible sessions.
+
+            * platform/audio/ios/MediaSessionManagerIOS.h:
+            * platform/audio/ios/MediaSessionManagerIOS.mm:
+            (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange):
+            (-[WebMediaSessionHelper activeAudioRouteDidChange:]):
+            (WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted.
+
+2019-08-21  Kocsen Chung  <[email protected]>
+
         Cherry-pick r248962. rdar://problem/54579627
 
     Adopt AVSystemController_ActiveAudioRouteDidChangeNotification

Modified: branches/safari-608-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h (249008 => 249009)


--- branches/safari-608-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h	2019-08-22 15:45:26 UTC (rev 249008)
+++ branches/safari-608-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h	2019-08-22 15:45:31 UTC (rev 249009)
@@ -50,7 +50,7 @@
 #if HAVE(CELESTIAL)
     void carPlayServerDied();
     void updateCarPlayIsConnected(Optional<bool>&&);
-    void activeRouteDidChange(Optional<bool>&&);
+    void activeAudioRouteDidChange(Optional<bool>&&);
 #endif
 
 private:

Modified: branches/safari-608-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm (249008 => 249009)


--- branches/safari-608-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm	2019-08-22 15:45:26 UTC (rev 249008)
+++ branches/safari-608-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm	2019-08-22 15:45:31 UTC (rev 249009)
@@ -226,13 +226,13 @@
     setIsPlayingToAutomotiveHeadUnit([[[getAVSystemControllerClass() sharedAVSystemController] attributeForKey:getAVSystemController_CarPlayIsConnectedAttribute()] boolValue]);
 }
 
-void MediaSessionManageriOS::activeRouteDidChange(Optional<bool>&& shouldPause)
+void MediaSessionManageriOS::activeAudioRouteDidChange(Optional<bool>&& shouldPause)
 {
     if (!shouldPause || !shouldPause.value())
         return;
 
     forEachSession([](auto& session) {
-        if (!session.shouldOverridePauseDuringRouteChange())
+        if (session.canProduceAudio() && !session.shouldOverridePauseDuringRouteChange())
             session.pauseSession();
     });
 }
@@ -515,7 +515,7 @@
 
     callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self), shouldPause = WTFMove(shouldPause)]() mutable {
         if (auto* callback = protectedSelf->_callback)
-            callback->activeRouteDidChange(WTFMove(shouldPause));
+            callback->activeAudioRouteDidChange(WTFMove(shouldPause));
     });
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to