Changeset 248978 in webkit


Ignore:
Timestamp:
Aug 21, 2019 5:11:28 PM (5 years ago)
Author:
jer.noble@apple.com
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.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r248977 r248978  
     12019-08-21  Jer Noble  <jer.noble@apple.com>
     2
     3        Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
     4        https://bugs.webkit.org/show_bug.cgi?id=200992
     5        <rdar://problem/54408993>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Follow-up to r248962: When the active audio route changes, and the
     10        system instructs us to pause, only pause the currently audible sessions.
     11
     12        * platform/audio/ios/MediaSessionManagerIOS.h:
     13        * platform/audio/ios/MediaSessionManagerIOS.mm:
     14        (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange):
     15        (-[WebMediaSessionHelper activeAudioRouteDidChange:]):
     16        (WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted.
     17
    1182019-08-21  Megan Gardner  <megan_gardner@apple.com>
    219
  • trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h

    r248962 r248978  
    5151    void carPlayServerDied();
    5252    void updateCarPlayIsConnected(Optional<bool>&&);
    53     void activeRouteDidChange(Optional<bool>&&);
     53    void activeAudioRouteDidChange(Optional<bool>&&);
    5454#endif
    5555
  • trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm

    r248962 r248978  
    227227}
    228228
    229 void MediaSessionManageriOS::activeRouteDidChange(Optional<bool>&& shouldPause)
     229void MediaSessionManageriOS::activeAudioRouteDidChange(Optional<bool>&& shouldPause)
    230230{
    231231    if (!shouldPause || !shouldPause.value())
     
    233233
    234234    forEachSession([](auto& session) {
    235         if (!session.shouldOverridePauseDuringRouteChange())
     235        if (session.canProduceAudio() && !session.shouldOverridePauseDuringRouteChange())
    236236            session.pauseSession();
    237237    });
     
    516516    callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self), shouldPause = WTFMove(shouldPause)]() mutable {
    517517        if (auto* callback = protectedSelf->_callback)
    518             callback->activeRouteDidChange(WTFMove(shouldPause));
     518            callback->activeAudioRouteDidChange(WTFMove(shouldPause));
    519519    });
    520520
Note: See TracChangeset for help on using the changeset viewer.