[MSE][GStreamer] Replaying the video should update currentTime
authoraboya@igalia.com <aboya@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Aug 2019 17:17:20 +0000 (17:17 +0000)
committeraboya@igalia.com <aboya@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Aug 2019 17:17:20 +0000 (17:17 +0000)
commitd1c25791ca12f862be959a2894cb67b94a4087de
treefe3143eff2c51d597109ebde4e79e796ba651516
parent57a9e2a43b54ace7db281b73b188eda068c509e7
[MSE][GStreamer] Replaying the video should update currentTime
https://bugs.webkit.org/show_bug.cgi?id=201307

Reviewed by Xabier Rodriguez-Calvar.

LayoutTests/imported/w3c:

* web-platform-tests/media-source/mediasource-replay-expected.txt: Added.
* web-platform-tests/media-source/mediasource-replay.html: Added.

Source/WebCore:

While writing a test to confirm that https://bugs.webkit.org/show_bug.cgi?id=190050
has indeed been fixed I noticed a non-conformity: when the video has
ended, right after calling .play() for a second playback currentTime
did not return zero, but the video duration.

This turned to be due to the m_isEndReached flag not being reseted on
seeks (replaying a video incurs in a seek done from multi-platform
code).

Test: imported/w3c/web-platform-tests/media-source/mediasource-replay.html

* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::seek):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-replay-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-replay.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp