Skip to content
Permalink
Browse files

[giow] (0) (WIP - MIMESNIFF has not yet been updated accordingly) Cha…

…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 7932e20a9795573f885d386ca81fef2ed2739210
Showing with 42 additions and 56 deletions.
  1. +13 −18 complete.html
  2. +13 −18 index
  3. +16 −20 source
<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>

31 index
<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>

36 source
<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>

0 comments on commit 7932e20

Please sign in to comment.
You can’t perform that action at this time.