<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[206399] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/206399">206399</a></dd>
<dt>Author</dt> <dd>wenson_hsieh@apple.com</dd>
<dt>Date</dt> <dd>2016-09-26 15:42:19 -0700 (Mon, 26 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Seeking video doesn't update seek position
https://bugs.webkit.org/show_bug.cgi?id=162575
&lt;rdar://problem/28457219&gt;

Reviewed by Jer Noble.

On ToT, seeking in a video causes the playhead to stutter, and does not actually update media remote's seek
position. This is partly due to how we do not update media remote with new information when beginning to respond
to remote seek commands, so media remote continues to think that a playing video is still playing despite the
user attempting to seek through it.

To fix this, we introduce timer-based guards around remote seek commands, such that a seek &quot;gesture&quot; begins when
we receive the first seek command and ends when no seek command has been received in a set amount of time (this
is 0.5 seconds, which is approximately what other clients around the platform use).

Also, when responding to a remote seek, perform the seek with no tolerance. This prevents the playhead from
stuttering at the end of a seek from the final requested destination of the seek to the last actually seeked
time in the video.

When beginning to seek, we must pause the media. Through existing mechanisms, this causes the media session
manager to update its Now Playing information, which informs media remote that we are no longer playing and
prevents us from stuttering. However, when ending a seek, we must also trigger an additional update to again
refresh media remote's view of the current time. This prevents a flicker when playing media after seeking.

Unit tests to be added in a follow-up due to time constraints.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::handleSeekToPlaybackPosition):
(WebCore::HTMLMediaElement::seekToPlaybackPositionEndedTimerFired):
(WebCore::HTMLMediaElement::didReceiveRemoteControlCommand):
* html/HTMLMediaElement.h:
* platform/audio/PlatformMediaSessionManager.h:
(WebCore::PlatformMediaSessionManager::scheduleUpdateNowPlayingInfo):
(WebCore::PlatformMediaSessionManager::sessionDidEndRemoteScrubbing):
(WebCore::PlatformMediaSessionManager::sessions): Deleted.
* platform/audio/mac/MediaSessionManagerMac.h:
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary):
(WebCore::MediaSessionManagerMac::scheduleUpdateNowPlayingInfo):
(WebCore::MediaSessionManagerMac::sessionDidEndRemoteScrubbing):
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementh">trunk/Source/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#trunkSourceWebCoreplatformaudioPlatformMediaSessionManagerh">trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h</a></li>
<li><a href="#trunkSourceWebCoreplatformaudiomacMediaSessionManagerMach">trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformaudiomacMediaSessionManagerMacmm">trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206398 => 206399)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-26 22:22:18 UTC (rev 206398)
+++ trunk/Source/WebCore/ChangeLog        2016-09-26 22:42:19 UTC (rev 206399)
</span><span class="lines">@@ -1,3 +1,48 @@
</span><ins>+2016-09-26  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Seeking video doesn't update seek position
+        https://bugs.webkit.org/show_bug.cgi?id=162575
+        &lt;rdar://problem/28457219&gt;
+
+        Reviewed by Jer Noble.
+
+        On ToT, seeking in a video causes the playhead to stutter, and does not actually update media remote's seek
+        position. This is partly due to how we do not update media remote with new information when beginning to respond
+        to remote seek commands, so media remote continues to think that a playing video is still playing despite the
+        user attempting to seek through it.
+
+        To fix this, we introduce timer-based guards around remote seek commands, such that a seek &quot;gesture&quot; begins when
+        we receive the first seek command and ends when no seek command has been received in a set amount of time (this
+        is 0.5 seconds, which is approximately what other clients around the platform use).
+
+        Also, when responding to a remote seek, perform the seek with no tolerance. This prevents the playhead from
+        stuttering at the end of a seek from the final requested destination of the seek to the last actually seeked
+        time in the video.
+
+        When beginning to seek, we must pause the media. Through existing mechanisms, this causes the media session
+        manager to update its Now Playing information, which informs media remote that we are no longer playing and
+        prevents us from stuttering. However, when ending a seek, we must also trigger an additional update to again
+        refresh media remote's view of the current time. This prevents a flicker when playing media after seeking.
+
+        Unit tests to be added in a follow-up due to time constraints.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::HTMLMediaElement):
+        (WebCore::HTMLMediaElement::handleSeekToPlaybackPosition):
+        (WebCore::HTMLMediaElement::seekToPlaybackPositionEndedTimerFired):
+        (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand):
+        * html/HTMLMediaElement.h:
+        * platform/audio/PlatformMediaSessionManager.h:
+        (WebCore::PlatformMediaSessionManager::scheduleUpdateNowPlayingInfo):
+        (WebCore::PlatformMediaSessionManager::sessionDidEndRemoteScrubbing):
+        (WebCore::PlatformMediaSessionManager::sessions): Deleted.
+        * platform/audio/mac/MediaSessionManagerMac.h:
+        * platform/audio/mac/MediaSessionManagerMac.mm:
+        (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary):
+        (WebCore::MediaSessionManagerMac::scheduleUpdateNowPlayingInfo):
+        (WebCore::MediaSessionManagerMac::sessionDidEndRemoteScrubbing):
+        (WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
+
</ins><span class="cx"> 2016-09-26  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WK2] BlobDownloadClient should use asynchronous IPC to decide destination path
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (206398 => 206399)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-09-26 22:22:18 UTC (rev 206398)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-09-26 22:42:19 UTC (rev 206399)
</span><span class="lines">@@ -405,6 +405,7 @@
</span><span class="cx">     , m_playbackProgressTimer(*this, &amp;HTMLMediaElement::playbackProgressTimerFired)
</span><span class="cx">     , m_scanTimer(*this, &amp;HTMLMediaElement::scanTimerFired)
</span><span class="cx">     , m_playbackControlsManagerBehaviorRestrictionsTimer(*this, &amp;HTMLMediaElement::playbackControlsManagerBehaviorRestrictionsTimerFired)
</span><ins>+    , m_seekToPlaybackPositionEndedTimer(*this, &amp;HTMLMediaElement::seekToPlaybackPositionEndedTimerFired)
</ins><span class="cx">     , m_playedTimeRanges()
</span><span class="cx">     , m_asyncEventQueue(*this)
</span><span class="cx">     , m_requestedPlaybackRate(1)
</span><span class="lines">@@ -467,6 +468,7 @@
</span><span class="cx">     , m_mediaControlsDependOnPageScaleFactor(false)
</span><span class="cx">     , m_haveSetUpCaptionContainer(false)
</span><span class="cx"> #endif
</span><ins>+    , m_isScrubbingRemotely(false)
</ins><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">     , m_tracksAreReady(true)
</span><span class="cx">     , m_haveVisibleTextTrack(false)
</span><span class="lines">@@ -4573,6 +4575,37 @@
</span><span class="cx">     m_playbackControlsManagerBehaviorRestrictionsTimer.startOneShot(HideMediaControlsAfterEndedDelay);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void HTMLMediaElement::handleSeekToPlaybackPosition(double position)
+{
+#if PLATFORM(MAC)
+    // FIXME: This should ideally use faskSeek, but this causes MediaRemote's playhead to flicker upon release.
+    // Please see &lt;rdar://problem/28457219&gt; for more details.
+    seek(MediaTime::createWithDouble(position));
+    m_seekToPlaybackPositionEndedTimer.stop();
+    m_seekToPlaybackPositionEndedTimer.startOneShot(0.5);
+
+    if (!m_isScrubbingRemotely) {
+        m_isScrubbingRemotely = true;
+        if (!paused())
+            pauseInternal();
+    }
+#else
+    fastSeek(position);
+#endif
+}
+
+void HTMLMediaElement::seekToPlaybackPositionEndedTimerFired()
+{
+#if PLATFORM(MAC)
+    if (!m_isScrubbingRemotely)
+        return;
+
+    PlatformMediaSessionManager::sharedManager().sessionDidEndRemoteScrubbing(*m_mediaSession);
+    m_isScrubbingRemotely = false;
+    m_seekToPlaybackPositionEndedTimer.stop();
+#endif
+}
+
</ins><span class="cx"> void HTMLMediaElement::mediaPlayerVolumeChanged(MediaPlayer*)
</span><span class="cx"> {
</span><span class="cx">     LOG(Media, &quot;HTMLMediaElement::mediaPlayerVolumeChanged(%p)&quot;, this);
</span><span class="lines">@@ -7015,7 +7048,7 @@
</span><span class="cx">     case PlatformMediaSession::SeekToPlaybackPositionCommand:
</span><span class="cx">         ASSERT(argument);
</span><span class="cx">         if (argument)
</span><del>-            fastSeek(argument-&gt;asDouble);
</del><ins>+            handleSeekToPlaybackPosition(argument-&gt;asDouble);
</ins><span class="cx">         break;
</span><span class="cx">     default:
</span><span class="cx">         { } // Do nothing
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (206398 => 206399)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h        2016-09-26 22:22:18 UTC (rev 206398)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2016-09-26 22:42:19 UTC (rev 206399)
</span><span class="lines">@@ -810,6 +810,8 @@
</span><span class="cx">     void setControllerJSProperty(const char*, JSC::JSValue);
</span><span class="cx"> 
</span><span class="cx">     void addBehaviorRestrictionsOnEndIfNecessary();
</span><ins>+    void handleSeekToPlaybackPosition(double);
+    void seekToPlaybackPositionEndedTimerFired();
</ins><span class="cx"> 
</span><span class="cx">     Timer m_pendingActionTimer;
</span><span class="cx">     Timer m_progressEventTimer;
</span><span class="lines">@@ -816,6 +818,7 @@
</span><span class="cx">     Timer m_playbackProgressTimer;
</span><span class="cx">     Timer m_scanTimer;
</span><span class="cx">     Timer m_playbackControlsManagerBehaviorRestrictionsTimer;
</span><ins>+    Timer m_seekToPlaybackPositionEndedTimer;
</ins><span class="cx">     GenericTaskQueue&lt;Timer&gt; m_seekTaskQueue;
</span><span class="cx">     GenericTaskQueue&lt;Timer&gt; m_resizeTaskQueue;
</span><span class="cx">     GenericTaskQueue&lt;Timer&gt; m_shadowDOMTaskQueue;
</span><span class="lines">@@ -968,6 +971,8 @@
</span><span class="cx">     bool m_haveSetUpCaptionContainer : 1;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    bool m_isScrubbingRemotely : 1;
+
</ins><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">     bool m_tracksAreReady : 1;
</span><span class="cx">     bool m_haveVisibleTextTrack : 1;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudioPlatformMediaSessionManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h (206398 => 206399)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h        2016-09-26 22:22:18 UTC (rev 206398)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h        2016-09-26 22:42:19 UTC (rev 206399)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~PlatformMediaSessionManager() { }
</span><span class="cx"> 
</span><ins>+    virtual void scheduleUpdateNowPlayingInfo() { }
</ins><span class="cx">     bool has(PlatformMediaSession::MediaType) const;
</span><span class="cx">     int count(PlatformMediaSession::MediaType) const;
</span><span class="cx">     bool activeAudioSessionRequired() const;
</span><span class="lines">@@ -85,6 +86,7 @@
</span><span class="cx">     virtual bool sessionWillBeginPlayback(PlatformMediaSession&amp;);
</span><span class="cx">     virtual void sessionWillEndPlayback(PlatformMediaSession&amp;);
</span><span class="cx">     virtual bool sessionCanLoadMedia(const PlatformMediaSession&amp;) const;
</span><ins>+    virtual void sessionDidEndRemoteScrubbing(const PlatformMediaSession&amp;) { };
</ins><span class="cx">     virtual void clientCharacteristicsChanged(PlatformMediaSession&amp;) { }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudiomacMediaSessionManagerMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.h (206398 => 206399)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.h        2016-09-26 22:22:18 UTC (rev 206398)
+++ trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.h        2016-09-26 22:42:19 UTC (rev 206399)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> 
</span><ins>+#include &quot;GenericTaskQueue.h&quot;
</ins><span class="cx"> #include &quot;PlatformMediaSessionManager.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -40,10 +41,12 @@
</span><span class="cx"> 
</span><span class="cx">     MediaSessionManagerMac();
</span><span class="cx"> 
</span><ins>+    void scheduleUpdateNowPlayingInfo() override;
</ins><span class="cx">     void removeSession(PlatformMediaSession&amp;) override;
</span><span class="cx"> 
</span><span class="cx">     bool sessionWillBeginPlayback(PlatformMediaSession&amp;) override;
</span><span class="cx">     void sessionWillEndPlayback(PlatformMediaSession&amp;) override;
</span><ins>+    void sessionDidEndRemoteScrubbing(const PlatformMediaSession&amp;) override;
</ins><span class="cx">     void clientCharacteristicsChanged(PlatformMediaSession&amp;) override;
</span><span class="cx"> 
</span><span class="cx">     void updateNowPlayingInfo();
</span><span class="lines">@@ -50,11 +53,9 @@
</span><span class="cx"> 
</span><span class="cx">     PlatformMediaSession* nowPlayingEligibleSession();
</span><span class="cx"> 
</span><del>-    double m_reportedRate { 0 };
-    double m_reportedDuration { 0 };
-    String m_reportedTitle;
</del><span class="cx">     bool m_nowPlayingActive { false };
</span><span class="cx">     bool m_isInBackground { false };
</span><ins>+    GenericTaskQueue&lt;Timer&gt; m_nowPlayingUpdateTaskQueue;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudiomacMediaSessionManagerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm (206398 => 206399)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm        2016-09-26 22:22:18 UTC (rev 206398)
+++ trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm        2016-09-26 22:42:19 UTC (rev 206399)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> void PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary()
</span><span class="cx"> {
</span><span class="cx">     if (auto existingManager = (MediaSessionManagerMac *)PlatformMediaSessionManager::sharedManagerIfExists())
</span><del>-        existingManager-&gt;updateNowPlayingInfo();
</del><ins>+        existingManager-&gt;scheduleUpdateNowPlayingInfo();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MediaSessionManagerMac::MediaSessionManagerMac()
</span><span class="lines">@@ -69,6 +69,12 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void MediaSessionManagerMac::scheduleUpdateNowPlayingInfo()
+{
+    if (!m_nowPlayingUpdateTaskQueue.hasPendingTasks())
+        m_nowPlayingUpdateTaskQueue.enqueueTask(std::bind(&amp;MediaSessionManagerMac::updateNowPlayingInfo, this));
+}
+
</ins><span class="cx"> bool MediaSessionManagerMac::sessionWillBeginPlayback(PlatformMediaSession&amp; session)
</span><span class="cx"> {
</span><span class="cx">     if (!PlatformMediaSessionManager::sessionWillBeginPlayback(session))
</span><span class="lines">@@ -79,6 +85,11 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void MediaSessionManagerMac::sessionDidEndRemoteScrubbing(const PlatformMediaSession&amp;)
+{
+    scheduleUpdateNowPlayingInfo();
+}
+
</ins><span class="cx"> void MediaSessionManagerMac::removeSession(PlatformMediaSession&amp; session)
</span><span class="cx"> {
</span><span class="cx">     PlatformMediaSessionManager::removeSession(session);
</span><span class="lines">@@ -123,9 +134,6 @@
</span><span class="cx">             LOG(Media, &quot;MediaSessionManagerMac::updateNowPlayingInfo - clearing now playing info&quot;);
</span><span class="cx">             MRMediaRemoteSetNowPlayingInfo(nullptr);
</span><span class="cx">             m_nowPlayingActive = false;
</span><del>-            m_reportedTitle = &quot;&quot;;
-            m_reportedRate = 0;
-            m_reportedDuration = 0;
</del><span class="cx">             MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin(MRMediaRemoteGetLocalOrigin(), kMRPlaybackStateStopped, dispatch_get_main_queue(), ^(MRMediaRemoteError error) {
</span><span class="cx"> #if LOG_DISABLED
</span><span class="cx">                 UNUSED_PARAM(error);
</span><span class="lines">@@ -146,16 +154,6 @@
</span><span class="cx">     String title = currentSession-&gt;title();
</span><span class="cx">     double duration = currentSession-&gt;duration();
</span><span class="cx">     double rate = currentSession-&gt;state() == PlatformMediaSession::Playing ? 1 : 0;
</span><del>-    if (m_reportedTitle == title &amp;&amp; m_reportedRate == rate &amp;&amp; m_reportedDuration == duration) {
-        m_nowPlayingActive = true;
-        LOG(Media, &quot;MediaSessionManagerMac::updateNowPlayingInfo - nothing new to show&quot;);
-        return;
-    }
-
-    m_reportedRate = rate;
-    m_reportedDuration = duration;
-    m_reportedTitle = title;
-
</del><span class="cx">     auto info = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 4, &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
</span><span class="cx"> 
</span><span class="cx">     if (!title.isEmpty())
</span></span></pre>
</div>
</div>

</body>
</html>