This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18589 - Unclear behavior when failing to attach to a media element
Summary: Unclear behavior when failing to attach to a media element
Status: VERIFIED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Media Source Extensions (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Aaron Colwell (c)
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-16 12:32 UTC by Philip Jägenstedt
Modified: 2012-10-02 08:08 UTC (History)
4 users (show)

See Also:


Attachments

Description Philip Jägenstedt 2012-08-16 12:32:20 UTC
http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#mediasource-attach

"Abort media element's resource fetch algorithm and run the steps to report a MEDIA_ERR_SRC_NOT_SUPPORTED error."

The way this is phrased is a bit strange. In HTML, there are two ways in which the resource fetch algorithm can end:

1. "Abort this subalgorithm, returning to the resource selection algorithm."

2. "Abort the overall resource selection algorithm." This is always preceded by setting error/readyState/networkState.

As phrased, it looks like MSE requires new code paths, which is probably not intentional.

Treating failure to attach as any (early) network error, like a failure to resolve the URL or a DNS error would do the right thing here, it will return to the resource selection algorithm and end up with MEDIA_ERR_SRC_NOT_SUPPORTED without further intervention.

In short, I think this should be spec'd as running the steps for "If the media data cannot be fetched at all, due to network errors, causing the user agent to give up trying to fetch the resource."
Comment 1 Aaron Colwell (c) 2012-08-17 21:55:56 UTC
If I understand you correctly, you'd like me to replace the existing text with these two steps from the section you mentioned?

"1. The user agent should cancel the fetching process.
2. Abort this subalgorithm, returning to the resource selection algorithm."
Comment 2 Philip Jägenstedt 2012-08-20 08:58:08 UTC
Yes, that is the effect I'm after, but "this subalgorithm" wouldn't make sense in the context of MSE. It's probably easiest to point at the steps to run in HTML. If the phrasing becomes awkward, we could always ask Hixie to create explicit and linkable concepts for MSE to hook into.

CC:ing Hixie in case he has better ideas for how to hook this into HTML.
Comment 3 Aaron Colwell (c) 2012-09-14 18:32:31 UTC
For now I'll just quote the HTML5 spec text but it would be nice if the following steps in the resource fetch algorithm had short names and id's to link to.

"If the media data cannot be fetched at all, due to network errors, causing the user agent to give up trying to fetch the resource" -> fatal-cannot-fetch ?

"If the media data can be fetched but is found by inspection to be in an unsupported format, or can otherwise not be rendered at all" -> fatal-unsupported-format ?

"If the connection is interrupted after some media data has been received, causing the user agent to give up trying to fetch the resource" -> fatal-network-error ?
Comment 4 Aaron Colwell (c) 2012-10-01 22:31:20 UTC
Changes committed.
http://dvcs.w3.org/hg/html-media/rev/7bab66368f2c