⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249009 in webkit


Ignore:
Timestamp:
Aug 22, 2019, 8:45:31 AM (7 years ago)
Author:
Kocsen Chung
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

Location:
branches/safari-608-branch/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-608-branch/Source/WebCore/ChangeLog

    r249008 r249009  
     12019-08-21  Kocsen Chung  <kocsen_chung@apple.com>
     2
     3        Cherry-pick r248978. rdar://problem/54579627
     4
     5    Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
     6    https://bugs.webkit.org/show_bug.cgi?id=200992
     7    <rdar://problem/54408993>
     8   
     9    Reviewed by Eric Carlson.
     10   
     11    Follow-up to r248962: When the active audio route changes, and the
     12    system instructs us to pause, only pause the currently audible sessions.
     13   
     14    * platform/audio/ios/MediaSessionManagerIOS.h:
     15    * platform/audio/ios/MediaSessionManagerIOS.mm:
     16    (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange):
     17    (-[WebMediaSessionHelper activeAudioRouteDidChange:]):
     18    (WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted.
     19   
     20   
     21    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     22
     23    2019-08-21  Jer Noble  <jer.noble@apple.com>
     24
     25            Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
     26            https://bugs.webkit.org/show_bug.cgi?id=200992
     27            <rdar://problem/54408993>
     28
     29            Reviewed by Eric Carlson.
     30
     31            Follow-up to r248962: When the active audio route changes, and the
     32            system instructs us to pause, only pause the currently audible sessions.
     33
     34            * platform/audio/ios/MediaSessionManagerIOS.h:
     35            * platform/audio/ios/MediaSessionManagerIOS.mm:
     36            (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange):
     37            (-[WebMediaSessionHelper activeAudioRouteDidChange:]):
     38            (WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted.
     39
    1402019-08-21  Kocsen Chung  <kocsen_chung@apple.com>
    241
  • branches/safari-608-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h

    r249008 r249009  
    5151    void carPlayServerDied();
    5252    void updateCarPlayIsConnected(Optional<bool>&&);
    53     void activeRouteDidChange(Optional<bool>&&);
     53    void activeAudioRouteDidChange(Optional<bool>&&);
    5454#endif
    5555
  • branches/safari-608-branch/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm

    r249008 r249009  
    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.