Commit e8dd2abe authored by joepeck@webkit.org's avatar joepeck@webkit.org

2011-03-14 Joseph Pecoraro <joepeck@webkit.org>

        Reviewed by Eric Carlson.

        Stalled media elements don't stop delaying the load event
        https://bugs.webkit.org/show_bug.cgi?id=56316

        * http/tests/media/video-play-stall-before-meta-data-expected.txt: Added.
        * http/tests/media/video-play-stall-before-meta-data.html: Added.
2011-03-14  Joseph Pecoraro  <joepeck@webkit.org>

        Reviewed by Eric Carlson.

        Stalled media elements don't stop delaying the load event
        https://bugs.webkit.org/show_bug.cgi?id=56316

        We should stop delaying the load event when the load has
        stalled naturally, or if we require a user gesture to
        continue the load.

        Test: http/tests/media/video-play-stall-before-meta-data.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::setNetworkState): when suspending, stop delaying.
        (WebCore::HTMLMediaElement::progressEventTimerFired): when stalling, stop delaying.

git-svn-id: svn://svn.chromium.org/blink/trunk@81104 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent fa26eb24
2011-03-14 Joseph Pecoraro <joepeck@webkit.org>
Reviewed by Eric Carlson.
Stalled media elements don't stop delaying the load event
https://bugs.webkit.org/show_bug.cgi?id=56316
* http/tests/media/video-play-stall-before-meta-data-expected.txt: Added.
* http/tests/media/video-play-stall-before-meta-data.html: Added.
2011-03-13 MORITA Hajime <morrita@google.com>
Reviewed by Tony Chang.
Test that stalling very early, while loading meta-data, stops delaying the load event.
EVENT(beforeload)
EVENT(loadstart)
EVENT(stalled)
EVENT(window.onload)
END OF TEST
<video></video>
<p>Test that stalling very early, while loading meta-data, stops delaying the load event.</p>
<script src=../../media-resources/video-test.js></script>
<script>
// Expected events.
waitForEvent("beforeload");
waitForEvent("loadstart");
waitForEvent("stalled");
waitForEvent("suspend");
// We want to make sure the onload event fires.
window.onload = function() {
consoleWrite("EVENT(window.onload)");
endTest();
};
// Load should stall very early in the loading process.
video.src = "http://127.0.0.1:8000/media/video-load-and-stall.cgi?name=../../../media/content/test.mp4&stallAt=1";
</script>
2011-03-14 Joseph Pecoraro <joepeck@webkit.org>
Reviewed by Eric Carlson.
Stalled media elements don't stop delaying the load event
https://bugs.webkit.org/show_bug.cgi?id=56316
We should stop delaying the load event when the load has
stalled naturally, or if we require a user gesture to
continue the load.
Test: http/tests/media/video-play-stall-before-meta-data.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setNetworkState): when suspending, stop delaying.
(WebCore::HTMLMediaElement::progressEventTimerFired): when stalling, stop delaying.
2011-03-13 MORITA Hajime <morrita@google.com>
Reviewed by Tony Chang.
......
......@@ -896,6 +896,7 @@ void HTMLMediaElement::setNetworkState(MediaPlayer::NetworkState state)
if (m_networkState > NETWORK_IDLE) {
m_progressEventTimer.stop();
scheduleEvent(eventNames().suspendEvent);
setShouldDelayLoadEvent(false);
}
m_networkState = NETWORK_IDLE;
}
......@@ -1027,6 +1028,7 @@ void HTMLMediaElement::progressEventTimerFired(Timer<HTMLMediaElement>*)
if (timedelta > 3.0 && !m_sentStalledEvent) {
scheduleEvent(eventNames().stalledEvent);
m_sentStalledEvent = true;
setShouldDelayLoadEvent(false);
}
} else {
scheduleEvent(eventNames().progressEvent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment