Title: [203706] trunk/Source/WebCore
- Revision
- 203706
- Author
- commit-qu...@webkit.org
- Date
- 2016-07-25 19:18:30 -0700 (Mon, 25 Jul 2016)
Log Message
Set MediaRemote playback state based on MediaSession playback state.
https://bugs.webkit.org/show_bug.cgi?id=160177
Patch by Jeremy Jones <jere...@apple.com> on 2016-07-25
Reviewed by Eric Carlson.
Use playback session state to update media remote playback state instead of
unconditionally setting it to playing.
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (203705 => 203706)
--- trunk/Source/WebCore/ChangeLog 2016-07-26 02:15:56 UTC (rev 203705)
+++ trunk/Source/WebCore/ChangeLog 2016-07-26 02:18:30 UTC (rev 203706)
@@ -1,3 +1,16 @@
+2016-07-25 Jeremy Jones <jere...@apple.com>
+
+ Set MediaRemote playback state based on MediaSession playback state.
+ https://bugs.webkit.org/show_bug.cgi?id=160177
+
+ Reviewed by Eric Carlson.
+
+ Use playback session state to update media remote playback state instead of
+ unconditionally setting it to playing.
+
+ * platform/audio/mac/MediaSessionManagerMac.mm:
+ (WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
+
2016-07-25 Zalan Bujtas <za...@apple.com>
RenderBox::haveSameDirection is used only by table items.
Modified: trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm (203705 => 203706)
--- trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm 2016-07-26 02:15:56 UTC (rev 203705)
+++ trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm 2016-07-26 02:18:30 UTC (rev 203706)
@@ -173,7 +173,8 @@
title.utf8().data(), rate, duration, currentTime);
m_nowPlayingActive = true;
- MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin(MRMediaRemoteGetLocalOrigin(), kMRPlaybackStatePlaying, dispatch_get_main_queue(), ^(MRMediaRemoteError error) {
+ MRPlaybackState playbackState = (currentSession->state() == PlatformMediaSession::Playing) ? kMRPlaybackStatePlaying : kMRPlaybackStatePaused;
+ MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin(MRMediaRemoteGetLocalOrigin(), playbackState, dispatch_get_main_queue(), ^(MRMediaRemoteError error) {
#if LOG_DISABLED
UNUSED_PARAM(error);
#else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes