Changeset 272589 in webkit


Ignore:
Timestamp:
Feb 9, 2021 10:33:24 AM (18 months ago)
Author:
eric.carlson@apple.com
Message:

[Mac] Connect MediaSession with MediaRemote and NowPlaying
https://bugs.webkit.org/show_bug.cgi?id=221431
<rdar://problem/74000363>

Unreviewed, fix a layout test assert.

  • Modules/mediasession/MediaSession.cpp:

(WebCore::platformCommandForMediaSessionAction): Map "skipad" to "nexttrack".
(WebCore::MediaSession::setActionHandler): Don't try to register media session actions
for which there is no platform command.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r272583 r272589  
     12021-02-09  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [Mac] Connect MediaSession with MediaRemote and NowPlaying
     4        https://bugs.webkit.org/show_bug.cgi?id=221431
     5        <rdar://problem/74000363>
     6
     7        Unreviewed, fix a layout test assert.
     8
     9        * Modules/mediasession/MediaSession.cpp:
     10        (WebCore::platformCommandForMediaSessionAction): Map "skipad" to "nexttrack".
     11        (WebCore::MediaSession::setActionHandler): Don't try to register media session actions
     12        for which there is no platform command.
     13
    1142021-02-09  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/Source/WebCore/Modules/mediasession/MediaSession.cpp

    r272445 r272589  
    5959            { MediaSessionAction::Stop, PlatformMediaSession::StopCommand },
    6060            { MediaSessionAction::Seekto, PlatformMediaSession::SeekToPlaybackPositionCommand },
     61            { MediaSessionAction::Skipad, PlatformMediaSession::NextTrackCommand },
    6162        };
    6263    }());
     
    117118        ALWAYS_LOG(LOGIDENTIFIER, "adding ", action);
    118119        m_actionHandlers.set(action, handler);
    119         PlatformMediaSessionManager::sharedManager().addSupportedCommand(platformCommandForMediaSessionAction(action));
     120        auto platformCommand = platformCommandForMediaSessionAction(action);
     121        if (platformCommand != PlatformMediaSession::NoCommand)
     122            PlatformMediaSessionManager::sharedManager().addSupportedCommand(platformCommand);
    120123    } else {
    121124        if (m_actionHandlers.contains(action)) {
Note: See TracChangeset for help on using the changeset viewer.