HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
682611984Add warnings about media elements and track and how to determine the type and how we don't know what hte solution is.2011-11-12 00:22
@@ -29726,39 +29726,44 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
     false. This stops <span title="delay the load event">delaying the
     load event</span>.</p>
 
     <p>The user agent may use whatever means necessary to fetch the
     resource (within the constraints put forward by this and other
     specifications); for example, reconnecting to the server in the
     face of network errors, using HTTP range retrieval requests, or
     switching to a streaming protocol. The user agent must consider a
     resource erroneous only if it has given up trying to fetch it.</p>
 
+    <p class="critical">This specification does not currently say
+    whether or how to check the MIME types of the media resources, or
+    whether or how to perform file type sniffing using the actual file
+    data. Implementors differ in their intentions on this matter and
+    it is therefore unclear what the right solution is. In the absence
+    of any requirement here, the HTTP specification's strict
+    requirement to follow the Content-Type header prevails
+    ("Content-Type specifies the media type of the underlying data."
+    ... "If and only if the media type is not given by a Content-Type
+    field, the recipient MAY attempt to guess the media type via
+    inspection of its content and/or the name extension(s) of the URI
+    used to identify the resource.").</p>
+
     <p>The <span>networking task source</span> <span
     title="concept-task">tasks</span> to process the data as it is
     being fetched must, when appropriate, include the relevant
     substeps from the following list:</p>
 
     <dl class="switch">
 
      <dt>If the <span>media data</span> cannot be fetched at all, due
      to network errors, causing the user agent to give up trying to
      fetch the resource</dt>
 
-     <dt>If the <span>media resource</span> is found to have <span
-     title="Content-Type">Content-Type metadata</span> that, when
-     parsed as a <span>MIME type</span> (including any codecs
-     described by the <code title="">codecs</code> parameter, if the
-     parameter is defined for that type), represents <span>a type that
-     the user agent knows it cannot render</span> (even if the actual
-     <span>media data</span> is in a supported format)</dt>
-
      <dt>If the <span>media data</span> can be fetched but is found by
      inspection to be in an unsupported format, or can otherwise not
      be rendered at all</dt>
 
      <dd>
 
       <p>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 <var
       title="">current media resource</var> is usable, as well as
@@ -34206,43 +34211,55 @@ interface <dfn>MediaController</dfn> {
 
    <li>
 
     <p><i>Download</i>: At this point, the text track is downloaded.</p>
 
     <p>If <var title="">URL</var> is not the empty string, perform a
     <span>potentially CORS-enabled fetch</span> of <var
     title="">URL</var>, with the <i>mode</i> being the state of the
     <span>media element</span>'s <code
     title="attr-media-crossorigin">crossorigin</code> content
-    attribute, the <i title="">origin</i> being the <span>origin</span> of the
-    <span>media element</span>'s <code>Document</code>, and the
-    <i>default origin behaviour</i> set to <i>fail</i>.</p>
+    attribute, the <i title="">origin</i> being the
+    <span>origin</span> of the <span>media element</span>'s
+    <code>Document</code>, and the <i>default origin behaviour</i> set
+    to <i>fail</i>.</p>
 
     <p>The resource obtained in this fashion, if any, contains the
     text track data. If any data is obtained, it is by definition
     <span>CORS-same-origin</span> (cross-origin resources that are not
     suitably CORS-enabled do not get this far).</p>
 
     <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 <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 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>
+    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 (e.g. the <span>WebVTT parser</span><!--
+    if the file starts with the "<code title="">WEBVTT</code>"
+    signature-->) as it is received, with the <span>text track list of
+    cues</span> being used for that parser's output.</p>
+
+    <p class="critical">This specification does not currently say
+    whether or how to check the MIME types of text tracks, or whether
+    or how to perform file type sniffing using the actual file data.
+    Implementors differ in their intentions on this matter and it is
+    therefore unclear what the right solution is. In the absence of
+    any requirement here, the HTTP specification's strict requirement
+    to follow the Content-Type header prevails ("Content-Type
+    specifies the media type of the underlying data." ... "If and only
+    if the media type is not given by a Content-Type field, the
+    recipient MAY attempt to guess the media type via inspection of
+    its content and/or the name extension(s) of the URI used to
+    identify the resource.").</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 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>

|