Title: [200675] trunk/Source/WebCore
Revision
200675
Author
[email protected]
Date
2016-05-10 22:40:23 -0700 (Tue, 10 May 2016)

Log Message

Don't update media duration at playback end while seeking.
https://bugs.webkit.org/show_bug.cgi?id=157557

Patch by Jeremy Jones <[email protected]> on 2016-05-10
Reviewed by Jer Noble.

If _javascript_ initiates a media element seek just as the media playback ends, don't update duration
to the current time as the current time is now the new seek time, not the time when playback ended.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::didEnd):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (200674 => 200675)


--- trunk/Source/WebCore/ChangeLog	2016-05-11 05:10:38 UTC (rev 200674)
+++ trunk/Source/WebCore/ChangeLog	2016-05-11 05:40:23 UTC (rev 200675)
@@ -1,3 +1,16 @@
+2016-05-10  Jeremy Jones  <[email protected]>
+
+        Don't update media duration at playback end while seeking.
+        https://bugs.webkit.org/show_bug.cgi?id=157557
+
+        Reviewed by Jer Noble.
+
+        If _javascript_ initiates a media element seek just as the media playback ends, don't update duration
+        to the current time as the current time is now the new seek time, not the time when playback ended.
+
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+        (WebCore::MediaPlayerPrivateAVFoundation::didEnd):
+
 2016-05-10  Joseph Pecoraro  <[email protected]>
 
         Fix typo CaptionUserPreferences::updateCaptionStyleSheetOveride

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp (200674 => 200675)


--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp	2016-05-11 05:10:38 UTC (rev 200674)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp	2016-05-11 05:40:23 UTC (rev 200675)
@@ -677,7 +677,7 @@
     // Hang onto the current time and use it as duration from now on since we are definitely at
     // the end of the movie. Do this because the initial duration is sometimes an estimate.
     MediaTime now = currentMediaTime();
-    if (now > MediaTime::zeroTime())
+    if (now > MediaTime::zeroTime() && !m_seeking)
         m_cachedDuration = now;
 
     updateStates();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to