HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
3027[Gecko] [Opera] [Webkit] Make how <video> loads resources a bit more stable -- setting src='' once fixes the src to load; <source>s are examined when the DOM is stable; error events are only fired on <source> (or once on <video> if the UA gave up) when using <source> elements.2009-04-29 19:14
@@ -21411,21 +21411,21 @@ interface <dfn>CueRangeCallback</dfn> {
   title="dom-media-error"><code>error</code></dfn> attribute, on
   getting, must return the <code>MediaError</code> object created for
   this last error, or null if there has not been an error.</p>
 
   </div>
 
   <pre class="idl">interface <dfn>MediaError</dfn> {
   const unsigned short <span title="dom-MediaError-MEDIA_ERR_ABORTED">MEDIA_ERR_ABORTED</span> = 1;
   const unsigned short <span title="dom-MediaError-MEDIA_ERR_NETWORK">MEDIA_ERR_NETWORK</span> = 2;
   const unsigned short <span title="dom-MediaError-MEDIA_ERR_DECODE">MEDIA_ERR_DECODE</span> = 3;
-  const unsigned short <span title="dom-MediaError-MEDIA_ERR_NONE_SUPPORTED">MEDIA_ERR_NONE_SUPPORTED</span> = 4;
+  const unsigned short <span title="dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED">MEDIA_ERR_SRC_NOT_SUPPORTED</span> = 4;
   readonly attribute unsigned short <span title="dom-MediaError-code">code</span>;
 };</pre>
 
   <dl class="domintro">
 
    <dt><var title="">media</var> . <code title="dom-media-error">error</code> . <code title="dom-MediaError-code">code</code></dt>
 
    <dd>
 
     <p>Returns the current error's error code, from the list below.</p>
@@ -21454,23 +21454,24 @@ interface <dfn>CueRangeCallback</dfn> {
    <dd>A network error of some description caused the user agent to
    stop fetching the <span>media resource</span>, after the resource
    was established to be usable.</dd>
 
    <dt><dfn title="dom-MediaError-MEDIA_ERR_DECODE"><code>MEDIA_ERR_DECODE</code></dfn> (numeric value 3)</dt>
 
    <dd>An error of some description occurred while decoding the
    <span>media resource</span>, after the resource was established to
    be usable.</dd>
 
-   <dt><dfn title="dom-MediaError-MEDIA_ERR_NONE_SUPPORTED"><code>MEDIA_ERR_NONE_SUPPORTED</code></dfn> (numeric value 4)</dt>
+   <dt><dfn title="dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED"><code>MEDIA_ERR_SRC_NOT_SUPPORTED</code></dfn> (numeric value 4)</dt>
 
-   <dd>No suitable <span>media resource</span> could be found.</dd>
+   <dd>The <span>media resource</span> indicated by the <code
+   title="attr-media-src">src</code> attribute was not suitable.</dd>
 
   </dl>
 
 
 
   <h5>Location of the media resource</h5>
 
   <p>The <dfn title="attr-media-src"><code>src</code></dfn> content
   attribute on <span title="media element">media elements</span> gives
   the address of the media resource (video, audio) to show. The
@@ -21858,74 +21859,88 @@ interface <dfn>CueRangeCallback</dfn> {
 
      <li><p>Before the <span title="concept-task">task</span> that set
      the <code title="attr-media-src">src</code> attribute or inserted
      the <code>source</code> element has a chance to complete, set the
      <span>media element</span>'s <span>delaying-the-load-event
      flag</span> to true (this <span title="delay the load
      event">delays the load event</span>), and set its <code
      title="dom-media-networkState">networkState</code> to <code
      title="dom-media-NETWORK_LOADING">NETWORK_LOADING</code>.</p></li>
 
+     <li><p>If a <code title="attr-media-src">src</code> attribute was
+     set before a <code>source</code> element was inserted, let <var
+     title="">src</var> equal the first value that was assigned to the
+     <code title="attr-media-src">src</code> attribute after this
+     algorithm was invoked.</p></li>
+
     </ol>
 
     <p>Otherwise, run these substeps:</p>
 
     <ol>
 
      <li><p>Set the <span>media element</span>'s
      <span>delaying-the-load-event flag</span> to true (this <span
      title="delay the load event">delays the load event</span>), and
      set its <code title="dom-media-networkState">networkState</code>
      to <code
      title="dom-media-NETWORK_LOADING">NETWORK_LOADING</code>.</p></li>
 
+     <li><p>If the <span>media element</span> has a <code
+     title="attr-media-src">src</code> attribute, let <var
+     title="">src</var> equal the value of that attribute.</p></li>
+
      <li><p>Run the remainder of the <span
      title="concept-media-load-algorithm">resource selection
      algorithm</span> steps asynchronously, allowing the <span
      title="concept-task">task</span> that invoked this algorithm to
      continue.</p></li>
 
     </ol>
 
    </li>
 
    <li><p class="note">By this point, the algorithm is running
    asynchronously.</p></li>
 
    <li><p><span>Queue a task</span> to <span>fire a progress
    event</span> called <code title="event-loadstart">loadstart</code>
    at the <span>media element</span>.</p></li>
 
    <li>
 
-    <p>If the <span>media element</span> has a <code
-    title="attr-media-src">src</code> attribute, then run these
-    substeps:</p>
+    <p>If <var title="">src</var> was given a value in the earlier
+    steps, then run these substeps:</p>
 
     <ol>
 
-     <li><p><span title="resolve a url">Resolve</span> the
-     <span>URL</span> given in that attribute, relative to the
-     <span>media element</span>.</p>
+     <li><p>Let <var title="">absolute URL</var> be the <span>absolute
+     URL</span> that would have resulted from <span title="resolve a
+     url">resolving</span> the <span>URL</span> given by <var
+     title="">src</var> relative to the <span>media element</span>
+     when the <code title="attr-media-src">src</code> attribute was
+     set to <var title="">src</var>.</p> <!-- i.e. changing xml:base
+     or <base> after src="" has no effect -->
 
-     <li><p>If that is successful, then run the <span
+     <li><p>If <var title="">absolute URL</var> was successfully
+     obtained, then run the <span
      title="concept-media-load-resource">resource fetch
-     algorithm</span> with the resulting <span>absolute URL</span>. If
-     that algorithm returns without aborting <em>this</em> one, then
-     the load failed.</p></li>
+     algorithm</span> with <var title="">absolute URL</var>. If that
+     algorithm returns without aborting <em>this</em> one, then the
+     load failed.</p></li>
 
      <li><p>Reaching this step indicates that either the URL failed to
      resolve, or the media resource failed to load. Set the <code
      title="dom-media-error">error</code> attribute to a new
      <code>MediaError</code> object whose <code
      title="dom-MediaError-code">code</code> attribute is set to <code
-     title="dom-MediaError-MEDIA_ERR_NONE_SUPPORTED">MEDIA_ERR_NONE_SUPPORTED</code>.</p></li>
+     title="dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED">MEDIA_ERR_SRC_NOT_SUPPORTED</code>.</p></li>
 
      <li><p>Set the element's <code
      title="dom-media-networkState">networkState</code> attribute to
      the <span
      title="dom-media-NETWORK_NO_SOURCE">NETWORK_NO_SOURCE</span>
      value.</p></li>
 
      <li><p><span>Queue a task</span> to <span>fire a progress
      event</span> called <code title="event-error">error</code> at the
      <span>media element</span>.</p></li>
@@ -21991,65 +22006,76 @@ interface <dfn>CueRangeCallback</dfn> {
        relative to the remaining nodes.</dd>
 
       </dl>
 
       <p>Other changes don't affect <var title="">pointer</var>.</p>
 
      </li>
 
      <li>
 
-      <p><i>Search loop:</i> Run these substeps atomically (so that
-      the DOM cannot change while they are running):</p>
+      <p><i>Search loop:</i> <span>Queue a task</span> to run the
+      following steps (so that no other tasks are running that could
+      make the DOM change while these steps are running):</p>
 
       <ol>
 
+       <li><p>Let <var title="">candidate</var> be null.</p></li>
+
        <li><p>If the node after <var title="">pointer</var> is the end
-       of the list, then jump to the step below labeled
-       <i>waiting</i>.</p></li>
+       of the list, then abort the task.</p></li>
 
        <li><p>If the node after <var title="">pointer</var> is a
        <code>source</code> element, let <var title="">candidate</var>
-       be that element; otherwise, let <var title="">candidate</var>
-       be null.</p></li>
+       be that element.</p></li>
 
        <li><p>Advance <var title="">pointer</var> so that the node
        before <var title="">pointer</var> is now the node that was
        after <var title="">pointer</var>, and the node after <var
        title="">pointer</var> is the node after the node that used to
        be after <var title="">pointer</var>.</p></li>
 
-       <li><p>If <var title="">candidate</var> is null, restart the
-       step labelled <i>search loop</i> from the first
-       substep.</p></li>
+       <li><p>If <var title="">candidate</var> is null, restart these
+       substeps from the first substep. Otherwise, abort the
+       task.</p></li>
+
+       <li><p><span title="resolve a url">Resolve</span> the
+       <span>URL</span> given by the <var title="">candidate</var>
+       element's <code title="attr-source-src">src</code> attribute
+       relative to <var title="">candidate</var>.</p></li>
 
       </ol>
 
+      <p>Wait for the task to run. When the task ends, if <var
+      title="">candidate</var> is null, then jump to the step below
+      labeled <i>waiting</i>. Otherwise, continue with the next
+      step.</p>
+
      </li>
 
      <li>
 
       <p>If any of the following conditions are true, then <span>queue
       a task</span> to <span>fire a simple event</span> called <code
       title="event-error">error</code> at the <var
       title="">candidate</var> element and then jump back to the step
       labelled <i>search loop</i>:</p>
 
       <ul>
 
        <li>The <var title="">candidate</var> element does not have a
        <code title="attr-source-src">src</code> attribute.</li>
 
        <li><span title="resolve a url">Resolving</span> the
        <span>URL</span> given by the <var title="">candidate</var>
        element's <code title="attr-source-src">src</code> attribute
-       relative to <var title="">candidate</var> fails.</li>
+       relative to <var title="">candidate</var> failed.</li>
 
        <li>The <var title="">candidate</var> element has a <code
        title="attr-source-type">type</code> attribute whose value,
        when parsed as a MIME type (including any codecs described by
        the <code title="">codec</code> parameter), represents <span>a
        type that the user agent knows it cannot render</span>.</li>
 
        <li>The <var title="">candidate</var> element has a <code
        title="attr-source-media">media</code> attribute whose value,
        when processed according to the rules for <a href="#mq">media
@@ -22076,36 +22102,26 @@ interface <dfn>CueRangeCallback</dfn> {
      relative to <var title="">candidate</var>. If that algorithm
      returns without aborting <em>this</em> one, then the load
      failed.</p></li>
 
      <li><p><span>Queue a task</span> to <span>fire a simple
      event</span> called <code title="event-error">error</code> at the
      <var title="">candidate</var> element.</p></li>
 
      <li><p>Return to the step labeled <i>search loop</i>.</p></li>
 
-     <li><p><i>Waiting:</i> Set the <code
-     title="dom-media-error">error</code> attribute to a new
-     <code>MediaError</code> object whose <code
-     title="dom-MediaError-code">code</code> attribute is set to <code
-     title="dom-MediaError-MEDIA_ERR_NONE_SUPPORTED">MEDIA_ERR_NONE_SUPPORTED</code>.</p></li>
-
-     <li><p>Set the element's <code
+     <li><p><i>Waiting:</i> Set the element's <code
      title="dom-media-networkState">networkState</code> attribute to
      the <span
      title="dom-media-NETWORK_NO_SOURCE">NETWORK_NO_SOURCE</span>
      value</p></li>
 
-     <li><p><span>Queue a task</span> to <span>fire a progress
-     event</span> called <code title="event-error">error</code> at the
-     <span>media element</span>.</p></li>
-
      <li><p>Set the element's <span>delaying-the-load-event flag</span>
      to false. This stops <span title="delay the load event">delaying
      the load event</span>.</p></li>
 
      <li><p>Wait until the node after <var title="">pointer</var> is a
      node other than the end of the list. (This step might wait
      forever.)</p></li>
 
      <li><p>Before the <span title="concept-task">task</span> that
      inserted the <code>source</code> element has a chance to

|