Skip to content

Commit

Permalink
[giow] (0) (WIP - MIMESNIFF has not yet been updated accordingly) Cha…
Browse files Browse the repository at this point in the history
…nge the spec to use MIMESNIFF rules for text tracks instead of blindly honouring MIME types.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13995

git-svn-id: http://svn.whatwg.org/webapps@6721 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 20, 2011
1 parent bcca771 commit 7932e20
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 56 deletions.
31 changes: 13 additions & 18 deletions complete.html
Expand Up @@ -31397,30 +31397,25 @@ <h6 id=sourcing-out-of-band-text-tracks><span class=secno>4.8.10.12.3 </span>Sou
<p>The <a href=#concept-task title=concept-task>tasks</a> <a href=#queue-a-task title="queue
a task">queued</a> by the <a href=#fetch title=fetch>fetching
algorithm</a> on the <a href=#networking-task-source>networking task source</a> to
process the data as it is being fetched must examine the
resource's <a href=#content-type title=Content-Type>Content Type
metadata</a>, once it is available, if it ever is. If no <a href=#content-type title=Content-Type>Content Type metadata</a> is ever
available, or if the type is not recognised as a text track
format, then the resource's format must be assumed to be
unsupported (this causes the load to fail, as described below). If
a type is obtained, and represents a supported text track format,
then the resource's data must be passed to the appropriate parser
process the data as it is being fetched must <a href=#content-type-sniffing-0 title="Content-Type sniffing">determine the sniffed type of a the
resource</a>. If the sniffed type of the resource is not a
supported text track format, the load will fail, as described
below. Otherwise, the resource's data must be passed to the
appropriate parser
<!--TTVTT-->
(e.g. the <a href=#webvtt-parser>WebVTT parser</a> if the <a href=#content-type title=Content-Type>Content Type metadata</a> is
<code><a href=#text/vtt>text/vtt</a></code>)
(e.g. the <a href=#webvtt-parser>WebVTT parser</a> if the file starts with the "<code title="">WEBVTT</code>" signature)
<!--TTVTT-->
as it is received, with the <a href=#text-track-list-of-cues>text
track list of cues</a> being used for that parser's output.</p>
as it is received, with the <a href=#text-track-list-of-cues>text track list of cues</a>
being used for that parser's output.</p>

<p>If the <a href=#fetch title=fetch>fetching algorithm</a> fails for
any reason (network error, the server returns an error code, a
cross-origin check fails, etc), if <var title="">URL</var> is the
empty string, or if the fetched resource is not in a supported
format, then <a href=#queue-a-task>queue a task</a> to first change the
<a href=#text-track-readiness-state>text track readiness state</a> to <a href=#text-track-failed-to-load title="text track
failed to load">failed to load</a> and then <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-error>error</code> at the
<code><a href=#the-track-element>track</a></code> element; and then, once that <a href=#concept-task title=concept-task>task</a> is <a href=#queue-a-task title="queue a
empty string, or if the sniffed type of the resource is not a
supported text track format, then <a href=#queue-a-task>queue a task</a> to
first change the <a href=#text-track-readiness-state>text track readiness state</a> to <a href=#text-track-failed-to-load title="text track failed to load">failed to load</a> and then
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-error>error</code> at the <code><a href=#the-track-element>track</a></code>
element; and then, once that <a href=#concept-task title=concept-task>task</a> is <a href=#queue-a-task title="queue a
task">queued</a>, move on to the step below labeled
<i>monitoring</i>.</p>

Expand Down
31 changes: 13 additions & 18 deletions index
Expand Up @@ -31397,30 +31397,25 @@ interface <dfn id=mediacontroller>MediaController</dfn> {
<p>The <a href=#concept-task title=concept-task>tasks</a> <a href=#queue-a-task title="queue
a task">queued</a> by the <a href=#fetch title=fetch>fetching
algorithm</a> on the <a href=#networking-task-source>networking task source</a> to
process the data as it is being fetched must examine the
resource's <a href=#content-type title=Content-Type>Content Type
metadata</a>, once it is available, if it ever is. If no <a href=#content-type title=Content-Type>Content Type metadata</a> is ever
available, or if the type is not recognised as a text track
format, then the resource's format must be assumed to be
unsupported (this causes the load to fail, as described below). If
a type is obtained, and represents a supported text track format,
then the resource's data must be passed to the appropriate parser
process the data as it is being fetched must <a href=#content-type-sniffing-0 title="Content-Type sniffing">determine the sniffed type of a the
resource</a>. If the sniffed type of the resource is not a
supported text track format, the load will fail, as described
below. Otherwise, the resource's data must be passed to the
appropriate parser
<!--TTVTT-->
(e.g. the <a href=#webvtt-parser>WebVTT parser</a> if the <a href=#content-type title=Content-Type>Content Type metadata</a> is
<code><a href=#text/vtt>text/vtt</a></code>)
(e.g. the <a href=#webvtt-parser>WebVTT parser</a> if the file starts with the "<code title="">WEBVTT</code>" signature)
<!--TTVTT-->
as it is received, with the <a href=#text-track-list-of-cues>text
track list of cues</a> being used for that parser's output.</p>
as it is received, with the <a href=#text-track-list-of-cues>text track list of cues</a>
being used for that parser's output.</p>

<p>If the <a href=#fetch title=fetch>fetching algorithm</a> fails for
any reason (network error, the server returns an error code, a
cross-origin check fails, etc), if <var title="">URL</var> is the
empty string, or if the fetched resource is not in a supported
format, then <a href=#queue-a-task>queue a task</a> to first change the
<a href=#text-track-readiness-state>text track readiness state</a> to <a href=#text-track-failed-to-load title="text track
failed to load">failed to load</a> and then <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-error>error</code> at the
<code><a href=#the-track-element>track</a></code> element; and then, once that <a href=#concept-task title=concept-task>task</a> is <a href=#queue-a-task title="queue a
empty string, or if the sniffed type of the resource is not a
supported text track format, then <a href=#queue-a-task>queue a task</a> to
first change the <a href=#text-track-readiness-state>text track readiness state</a> to <a href=#text-track-failed-to-load title="text track failed to load">failed to load</a> and then
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-error>error</code> at the <code><a href=#the-track-element>track</a></code>
element; and then, once that <a href=#concept-task title=concept-task>task</a> is <a href=#queue-a-task title="queue a
task">queued</a>, move on to the step below labeled
<i>monitoring</i>.</p>

Expand Down
36 changes: 16 additions & 20 deletions source
Expand Up @@ -34244,32 +34244,28 @@ interface <dfn>MediaController</dfn> {
<p>The <span title="concept-task">tasks</span> <span title="queue
a task">queued</span> by the <span title="fetch">fetching
algorithm</span> on the <span>networking task source</span> to
process the data as it is being fetched must examine the
resource's <span title="Content-Type">Content Type
metadata</span>, once it is available, if it ever is. If no <span
title="Content-Type">Content Type metadata</span> is ever
available, or if the type is not recognised as a text track
format, then the resource's format must be assumed to be
unsupported (this causes the load to fail, as described below). If
a type is obtained, and represents a supported text track format,
then the resource's data must be passed to the appropriate parser
process the data as it is being fetched must <span
title="Content-Type sniffing">determine the sniffed type of a the
resource</span>. If the sniffed type of the resource is not a
supported text track format, the load will fail, as described
below. Otherwise, the resource's data must be passed to the
appropriate parser
<!--END w3c-html--><!--TTVTT-->
(e.g. the <span>WebVTT parser</span> if the <span
title="Content-Type">Content Type metadata</span> is
<code>text/vtt</code>)
(e.g. the <span>WebVTT parser</span> if the file starts with the "<code title="">WEBVTT</code>" signature)
<!--START w3c-html--><!--TTVTT-->
as it is received, with the <span>text
track list of cues</span> being used for that parser's output.</p>
as it is received, with the <span>text track list of cues</span>
being used for that parser's output.</p>

<p>If the <span title="fetch">fetching algorithm</span> fails for
any reason (network error, the server returns an error code, a
cross-origin check fails, etc), if <var title="">URL</var> is the
empty string, or if the fetched resource is not in a supported
format, then <span>queue a task</span> to first change the
<span>text track readiness state</span> to <span title="text track
failed to load">failed to load</span> and then <span>fire a simple
event</span> named <code title="event-error">error</code> at the
<code>track</code> element; and then, once that <span
empty string, or if the sniffed type of the resource is not a
supported text track format, then <span>queue a task</span> to
first change the <span>text track readiness state</span> to <span
title="text track failed to load">failed to load</span> and then
<span>fire a simple event</span> named <code
title="event-error">error</code> at the <code>track</code>
element; and then, once that <span
title="concept-task">task</span> is <span title="queue a
task">queued</span>, move on to the step below labeled
<i>monitoring</i>.</p>
Expand Down

0 comments on commit 7932e20

Please sign in to comment.