RESOLVED FIXED 33744
video.networkState remains NETWORK_LOADING indefinitely when no <source> element was able to be loaded
https://bugs.webkit.org/show_bug.cgi?id=33744
Summary video.networkState remains NETWORK_LOADING indefinitely when no <source> elem...
Adam Roben (:aroben)
Reported 2010-01-15 14:29:38 PST
To reproduce: 1. Download the attached test case to LayoutTests/media 2. run-webkit-tests media/media-no-source-networkState.html The test fails because video.networkState has remained NETWORK_LOADING even though we failed to load the one and only <source> element. HTML5 says networkState should be NETWORK_NO_SOURCE at this point. See <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#concept-media-load-algorithm> step 6.17: > ⌛ Waiting: Set the element's networkState attribute to the NETWORK_NO_SOURCE value. Note that <video src=doesnotexist.mp4> does not have this bug.
Attachments
test case (458 bytes, text/html)
2010-01-18 06:24 PST, Adam Roben (:aroben)
no flags
Proposed patch (5.75 KB, patch)
2010-01-19 10:01 PST, Eric Carlson
aroben: review+
Adam Roben (:aroben)
Comment 1 2010-01-15 14:30:13 PST
Adam Roben (:aroben)
Comment 2 2010-01-15 14:36:40 PST
I think we need to set m_networkState here <http://trac.webkit.org/browser/trunk/WebCore/html/HTMLMediaElement.cpp?rev=53146#L692>: // If we failed while trying to load a <source> element, the movie was never parsed, and there are more // <source> children, schedule the next one if (m_readyState < HAVE_METADATA && m_loadState == LoadingFromSourceElement) { m_currentSourceNode->scheduleErrorEvent(); if (havePotentialSourceChild()) scheduleNextSourceChild(); return; }
Adam Roben (:aroben)
Comment 3 2010-01-15 14:36:57 PST
This seems related to bug 33735.
Eric Carlson
Comment 4 2010-01-16 14:10:59 PST
Looks like you forgot to attach the test case.
Adam Roben (:aroben)
Comment 5 2010-01-18 06:24:26 PST
Created attachment 46817 [details] test case (I think there's something buggy with adding an attachment to a bug that you are just creating (i.e., using the "Add Attachment" form on the Create Bug page).)
Eric Carlson
Comment 6 2010-01-19 10:01:40 PST
Created attachment 46921 [details] Proposed patch
Adam Roben (:aroben)
Comment 7 2010-01-19 10:13:42 PST
Comment on attachment 46921 [details] Proposed patch Your test seems to indicate that this fixes bug 33735, too. Is that true? r=me
Eric Carlson
Comment 8 2010-01-19 11:33:44 PST
Note You need to log in before you can comment on or make changes to this bug.