Title: [248978] trunk/Source/WebCore
- Revision
- 248978
- Author
- jer.no...@apple.com
- Date
- 2019-08-21 17:11:28 -0700 (Wed, 21 Aug 2019)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (248977 => 248978)
--- trunk/Source/WebCore/ChangeLog 2019-08-22 00:06:38 UTC (rev 248977)
+++ trunk/Source/WebCore/ChangeLog 2019-08-22 00:11:28 UTC (rev 248978)
@@ -1,3 +1,20 @@
+2019-08-21 Jer Noble <jer.no...@apple.com>
+
+ 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 Megan Gardner <megan_gard...@apple.com>
Do not adjust viewport if editing selection is already visible
Modified: trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h (248977 => 248978)
--- trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h 2019-08-22 00:06:38 UTC (rev 248977)
+++ trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h 2019-08-22 00:11:28 UTC (rev 248978)
@@ -50,7 +50,7 @@
#if HAVE(CELESTIAL)
void carPlayServerDied();
void updateCarPlayIsConnected(Optional<bool>&&);
- void activeRouteDidChange(Optional<bool>&&);
+ void activeAudioRouteDidChange(Optional<bool>&&);
#endif
private:
Modified: trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm (248977 => 248978)
--- trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm 2019-08-22 00:06:38 UTC (rev 248977)
+++ trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm 2019-08-22 00:11:28 UTC (rev 248978)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes