RE: MediaStreams and Media elements

I have very low confidence in my interpretation of the algorithm, but as I read it,  the algorithm is in the resource fetch algorithm when it detects that the media can’t be played.  It doesn’t raise an error here, but it  does return to the resource selection algorithm without aborting it.  Here’s the relevant snippet:

If the media data<http://www.w3.org/TR/html5/embedded-content-0.html#media-data> can be fetched but is found by inspection to be in an unsupported format, or can otherwise not be rendered at all
DNS errors, HTTP 4xx and 5xx errors (and equivalents in other protocols), and other fatal network errors that occur before the user agent has established whether the current media resource is usable, as well as the file using an unsupported container format, or using unsupported codecs for all the data, must cause the user agent to execute the following steps:
1.      The user agent should cancel the fetching process.
2.      Abort this subalgorithm, returning to the resource selection algorithm<http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-algorithm>.
The relevant part of the resource selection algorithm is as follows.  The second sentence in the first bullet item applies, so the load failed, and the following steps raise an error:


•  If absolute URL was obtained successfully, run the resource fetch algorithm<http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource> with absolute URL. If that algorithm returns without aborting this one, then the load failed.

•  Failed: Reaching this step indicates that the media resource failed to load or that the given URL<http://www.w3.org/TR/html5/infrastructure.html#url> could not be resolved<http://www.w3.org/TR/html5/infrastructure.html#resolve-a-url>. In one atomic operation, run the following steps:

1.      Set the error<http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-error> attribute to a new MediaError<http://www.w3.org/TR/html5/embedded-content-0.html#mediaerror> object whose code<http://www.w3.org/TR/html5/embedded-content-0.html#dom-mediaerror-code> attribute is set to MEDIA_ERR_SRC_NOT_SUPPORTED<http://www.w3.org/TR/html5/embedded-content-0.html#dom-mediaerror-media_err_src_not_supported>.

2.      Forget the media element's media-resource-specific text tracks<http://www.w3.org/TR/html5/embedded-content-0.html#forget-the-media-element%27s-media-resource-specific-text-tracks>.

3.      Set the element's networkState<http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-networkstate> attribute to the NETWORK_NO_SOURCE<http://www.w3.org/TR/html5/embedded-content-0.html#dom-media-network_no_source> value.

•  Queue a task<http://www.w3.org/TR/html5/webappapis.html#queue-a-task> to fire a simple event<http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event> named error<http://www.w3.org/TR/html5/embedded-content-0.html#event-media-error> at the media element<http://www.w3.org/TR/html5/embedded-content-0.html#media-element>.

-          Jim


From: rocallahan@gmail.com [mailto:rocallahan@gmail.com] On Behalf Of Robert O'Callahan
Sent: Thursday, May 30, 2013 8:13 PM
To: Jim Barnett
Cc: Adam Bergkvist; public-media-capture@w3.org
Subject: Re: MediaStreams and Media elements

On Fri, May 31, 2013 at 3:00 AM, Jim Barnett <Jim.Barnett@genesyslab.com<mailto:Jim.Barnett@genesyslab.com>> wrote:
As I read the resource fetch algorithm in the HTML5 spec (which is with great difficulty), I think that if the media element loads a resource with no playable tracks, it will raise an error.

Can you explain your reasoning? I don't see it.

Rob
--
q“qIqfq qyqoquq qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qyqoquq,q qwqhqaqtq qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q qEqvqeqnq qsqiqnqnqeqrqsq qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qtqhqeqmq.q qAqnqdq qiqfq qyqoquq qdqoq qgqoqoqdq qtqoq qtqhqoqsqeq qwqhqoq qaqrqeq qgqoqoqdq qtqoq qyqoquq,q qwqhqaqtq qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q qEqvqeqnq qsqiqnqnqeqrqsq qdqoq qtqhqaqtq.q"

Received on Friday, 31 May 2013 13:13:48 UTC