Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r169200 - Video is resumed with old playback rate.
https://bugs.webkit.org/show_bug.cgi?id=132905 Patch by Piotr Grad <p.grad@samsung.com> on 2014-05-22 Reviewed by Philippe Normand. Source/WebCore: Setting '0' playback rate is causing pipeline to pause. GStreamer player impl. exposed this information to upper layers but it should not. Solution is to hidden such situation behind m_playbackRatePause flag. Test: media/video-paused-0-rate.html * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::play): (WebCore::MediaPlayerPrivateGStreamer::pause): (WebCore::MediaPlayerPrivateGStreamer::doSeek): (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate): (WebCore::MediaPlayerPrivateGStreamer::paused): (WebCore::MediaPlayerPrivateGStreamer::setRate): (WebCore::MediaPlayerPrivateGStreamer::updateStates): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: LayoutTests: * media/video-paused-0-rate-expected.txt: Added. * media/video-paused-0-rate.html: Added.
- Loading branch information
1 parent
1772a19
commit 913401c
Showing
6 changed files
with
116 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
Test that setting '0' playbackRate works correctly. | ||
|
||
EVENT(canplaythrough) | ||
EXPECTED (video.currentTime == '0') OK | ||
EXPECTED (video.paused == 'false') OK | ||
END OF TEST | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src=media-file.js></script> | ||
<script src=video-test.js></script> | ||
<script> | ||
var timeUpdateWasCalled = false; | ||
function start() | ||
{ | ||
findMediaElement(); | ||
video.src = findMediaFile("video", "content/test"); | ||
waitForEventAndFail('ended'); | ||
video.addEventListener('timeupdate', timeupdate); | ||
waitForEventOnce('canplaythrough', canPlayThrough); | ||
} | ||
|
||
function canPlayThrough() | ||
{ | ||
video.playbackRate = 0; | ||
video.play(); | ||
} | ||
|
||
function timeupdate() | ||
{ | ||
testExpected('video.currentTime', 0); | ||
testExpected('video.paused', false); | ||
if(timeUpdateWasCalled) | ||
failTest("Time was updated, but should not change."); | ||
timeUpdateWasCalled = true; | ||
setTimeout("endTest()", 150); | ||
} | ||
</script> | ||
</head> | ||
<body onload="start()"> | ||
<video></video> | ||
<p>Test that setting '0' playbackRate works correctly.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters