[whatwg] Media resource fetch algorithm reporting failure

  Ah I see that we will fire an error event when we return to the 
resource selection algorithm in this case, since we didn't abort the 
resource selection algorithm. Never mind!

Chris P.


On 16/09/2010 3:48 p.m., Chris Pearce wrote:
> In the media element resource fetch algorithm [1], there's this step:
>
> <quote>
>
> If the media data 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#media-data> 
> cannot be fetched at all, due to network errors, causing the user 
> agent to give up trying to fetch the resource [or]
> If the media resource 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#media-resource> 
> is found to have Content-Type metadata 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#content-type> 
> that, when parsed as a MIME type 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#mime-type> 
> (including any codecs described by the |codecs| parameter), represents 
> a type that the user agent knows it cannot render 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#a-type-that-the-user-agent-knows-it-cannot-render> 
> (even if the actual media data 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#media-data> 
> is in a supported format) [or]
> If the media data 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.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
>
>   1.
>
>       The user agent should cancel the fetching process.
>
>   2.
>
>       Abort this subalgorithm, returning to the resource selection
>       algorithm
>       <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#concept-media-load-algorithm>.
>
> </quote>
>
> Why don't we dispatch an error event to the candidate source child we 
> were loading from, or the media element if it was loading from a 
> source attribute, in this case? We dispatch error events in the 
> resource selection algorithm if the source child has an unsupported 
> type, how is this significantly different?
>
>
> Regards,
> Chris Pearce.
>
> [1] 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#concept-media-load-resource

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100916/4c4a2b21/attachment.htm>

Received on Thursday, 16 September 2010 16:53:39 UTC