Title: [270681] trunk/Source/WebCore
- Revision
- 270681
- Author
- [email protected]
- Date
- 2020-12-11 09:28:56 -0800 (Fri, 11 Dec 2020)
Log Message
[iOS] Adopt AVSystemController_SubscribeToNotificationsAttribute
https://bugs.webkit.org/show_bug.cgi?id=219754
<rdar://problem/71352731>
Reviewed by Eric Carlson.
Ask AVSystemController to send us the notifications we are interested in,
making sure to ask again if the server dies.
* platform/audio/ios/MediaSessionHelperIOS.mm:
(MediaSessionHelperiOS::mediaServerConnectionDied):
(-[WebMediaSessionHelper initWithCallback:]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (270680 => 270681)
--- trunk/Source/WebCore/ChangeLog 2020-12-11 17:05:54 UTC (rev 270680)
+++ trunk/Source/WebCore/ChangeLog 2020-12-11 17:28:56 UTC (rev 270681)
@@ -1,3 +1,18 @@
+2020-12-11 Jer Noble <[email protected]>
+
+ [iOS] Adopt AVSystemController_SubscribeToNotificationsAttribute
+ https://bugs.webkit.org/show_bug.cgi?id=219754
+ <rdar://problem/71352731>
+
+ Reviewed by Eric Carlson.
+
+ Ask AVSystemController to send us the notifications we are interested in,
+ making sure to ask again if the server dies.
+
+ * platform/audio/ios/MediaSessionHelperIOS.mm:
+ (MediaSessionHelperiOS::mediaServerConnectionDied):
+ (-[WebMediaSessionHelper initWithCallback:]):
+
2020-12-11 Youenn Fablet <[email protected]>
Introduce a way to update additional settings than the one handled by policies
Modified: trunk/Source/WebCore/platform/audio/ios/MediaSessionHelperIOS.mm (270680 => 270681)
--- trunk/Source/WebCore/platform/audio/ios/MediaSessionHelperIOS.mm 2020-12-11 17:05:54 UTC (rev 270680)
+++ trunk/Source/WebCore/platform/audio/ios/MediaSessionHelperIOS.mm 2020-12-11 17:28:56 UTC (rev 270681)
@@ -57,6 +57,7 @@
SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_CarPlayIsConnectedDidChangeNotification, NSString *)
SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_CarPlayIsConnectedNotificationParameter, NSString *)
SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_ServerConnectionDiedNotification, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(Celestial, AVSystemController_SubscribeToNotificationsAttribute, NSString *)
#endif
using namespace WebCore;
@@ -239,6 +240,10 @@
{
updateCarPlayIsConnected(WTF::nullopt);
+ // FIXME: Remove these once rdar://27662716 lands
+ if (canLoadAVSystemController_CarPlayIsConnectedDidChangeNotification() && canLoadAVSystemController_SubscribeToNotificationsAttribute())
+ [[getAVSystemControllerClass() sharedAVSystemController] setAttribute:@[getAVSystemController_CarPlayIsConnectedDidChangeNotification()] forKey:getAVSystemController_SubscribeToNotificationsAttribute() error:nil];
+
if (!m_havePresentedApplicationPID)
return;
@@ -352,6 +357,8 @@
[center addObserver:self selector:@selector(mediaServerConnectionDied:) name:getAVSystemController_ServerConnectionDiedNotification() object:nil];
if (canLoadAVSystemController_CarPlayIsConnectedDidChangeNotification())
[center addObserver:self selector:@selector(carPlayIsConnectedDidChange:) name:getAVSystemController_CarPlayIsConnectedDidChangeNotification() object:nil];
+ if (canLoadAVSystemController_CarPlayIsConnectedDidChangeNotification() && canLoadAVSystemController_SubscribeToNotificationsAttribute())
+ [[getAVSystemControllerClass() sharedAVSystemController] setAttribute:@[getAVSystemController_CarPlayIsConnectedDidChangeNotification()] forKey:getAVSystemController_SubscribeToNotificationsAttribute() error:nil];
#endif
// Now playing won't work unless we turn on the delivery of remote control events.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes