W3C home > Mailing lists > Public > public-html-commits@w3.org > April 2009

html5/spec Overview.html,1.2187,1.2188

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 29 Apr 2009 19:14:28 +0000
To: public-html-commits@w3.org
Message-Id: <E1LzFEi-0006lM-PS@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv25982

Modified Files:
	Overview.html 
Log Message:
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. (whatwg r3027)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2187
retrieving revision 1.2188
diff -u -d -r1.2187 -r1.2188
--- Overview.html	29 Apr 2009 08:29:29 -0000	1.2187
+++ Overview.html	29 Apr 2009 19:14:25 -0000	1.2188
@@ -17318,7 +17318,7 @@
   const unsigned short <a href="#dom-mediaerror-media_err_aborted" title="dom-MediaError-MEDIA_ERR_ABORTED">MEDIA_ERR_ABORTED</a> = 1;
   const unsigned short <a href="#dom-mediaerror-media_err_network" title="dom-MediaError-MEDIA_ERR_NETWORK">MEDIA_ERR_NETWORK</a> = 2;
   const unsigned short <a href="#dom-mediaerror-media_err_decode" title="dom-MediaError-MEDIA_ERR_DECODE">MEDIA_ERR_DECODE</a> = 3;
-  const unsigned short <a href="#dom-mediaerror-media_err_none_supported" title="dom-MediaError-MEDIA_ERR_NONE_SUPPORTED">MEDIA_ERR_NONE_SUPPORTED</a> = 4;
+  const unsigned short <a href="#dom-mediaerror-media_err_src_not_supported" title="dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED">MEDIA_ERR_SRC_NOT_SUPPORTED</a> = 4;
   readonly attribute unsigned short <a href="#dom-mediaerror-code" title="dom-MediaError-code">code</a>;
 };</pre><dl class="domintro"><dt><var title="">media</var> . <code title="dom-media-error"><a href="#dom-media-error">error</a></code> . <code title="dom-MediaError-code"><a href="#dom-mediaerror-code">code</a></code></dt>
 
@@ -17351,9 +17351,9 @@
    <a href="#media-resource">media resource</a>, after the resource was established to
    be usable.</dd>
 
-   <dt><dfn id="dom-mediaerror-media_err_none_supported" title="dom-MediaError-MEDIA_ERR_NONE_SUPPORTED"><code>MEDIA_ERR_NONE_SUPPORTED</code></dfn> (numeric value 4)</dt>
+   <dt><dfn id="dom-mediaerror-media_err_src_not_supported" title="dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED"><code>MEDIA_ERR_SRC_NOT_SUPPORTED</code></dfn> (numeric value 4)</dt>
 
-   <dd>No suitable <a href="#media-resource">media resource</a> could be found.</dd>
+   <dd>The <a href="#media-resource">media resource</a> indicated by the <code title="attr-media-src"><a href="#attr-media-src">src</a></code> attribute was not suitable.</dd>
 
   </dl><h5 id="location-of-the-media-resource"><span class="secno">4.8.10.2 </span>Location of the media resource</h5><p>The <dfn id="attr-media-src" title="attr-media-src"><code>src</code></dfn> content
   attribute on <a href="#media-element" title="media element">media elements</a> gives
@@ -17641,6 +17641,11 @@
      flag</a> to true (this <a href="#delay-the-load-event" title="delay the load
      event">delays the load event</a>), and set its <code title="dom-media-networkState"><a href="#dom-media-networkstate">networkState</a></code> to <code title="dom-media-NETWORK_LOADING"><a href="#dom-media-network_loading">NETWORK_LOADING</a></code>.</li>
 
+     <li><p>If a <code title="attr-media-src"><a href="#attr-media-src">src</a></code> attribute was
+     set before a <code><a href="#the-source-element">source</a></code> element was inserted, let <var title="">src</var> equal the first value that was assigned to the
+     <code title="attr-media-src"><a href="#attr-media-src">src</a></code> attribute after this
+     algorithm was invoked.</li>
+
     </ol><p>Otherwise, run these substeps:</p>
 
     <ol><li><p>Set the <a href="#media-element">media element</a>'s
@@ -17648,6 +17653,8 @@
      set its <code title="dom-media-networkState"><a href="#dom-media-networkstate">networkState</a></code>
      to <code title="dom-media-NETWORK_LOADING"><a href="#dom-media-network_loading">NETWORK_LOADING</a></code>.</li>
 
+     <li><p>If the <a href="#media-element">media element</a> has a <code title="attr-media-src"><a href="#attr-media-src">src</a></code> attribute, let <var title="">src</var> equal the value of that attribute.</li>
+
      <li><p>Run the remainder of the <a href="#concept-media-load-algorithm" title="concept-media-load-algorithm">resource selection
      algorithm</a> steps asynchronously, allowing the <a href="#concept-task" title="concept-task">task</a> that invoked this algorithm to
      continue.</li>
@@ -17663,21 +17670,25 @@
 
    <li>
 
-    <p>If the <a href="#media-element">media element</a> has a <code title="attr-media-src"><a href="#attr-media-src">src</a></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><a href="#resolve-a-url" title="resolve a url">Resolve</a> the
-     <a href="#url">URL</a> given in that attribute, relative to the
-     <a href="#media-element">media element</a>.</p>
+    <ol><li><p>Let <var title="">absolute URL</var> be the <a href="#absolute-url">absolute
+     URL</a> that would have resulted from <a href="#resolve-a-url" title="resolve a
+     url">resolving</a> the <a href="#url">URL</a> given by <var title="">src</var> relative to the <a href="#media-element">media element</a>
+     when the <code title="attr-media-src"><a href="#attr-media-src">src</a></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 <a href="#concept-media-load-resource" title="concept-media-load-resource">resource fetch
-     algorithm</a> with the resulting <a href="#absolute-url">absolute URL</a>. If
-     that algorithm returns without aborting <em>this</em> one, then
-     the load failed.</li>
+     <li><p>If <var title="">absolute URL</var> was successfully
+     obtained, then run the <a href="#concept-media-load-resource" title="concept-media-load-resource">resource fetch
+     algorithm</a> with <var title="">absolute URL</var>. If that
+     algorithm returns without aborting <em>this</em> one, then the
+     load failed.</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"><a href="#dom-media-error">error</a></code> attribute to a new
-     <code><a href="#mediaerror">MediaError</a></code> object whose <code title="dom-MediaError-code"><a href="#dom-mediaerror-code">code</a></code> attribute is set to <code title="dom-MediaError-MEDIA_ERR_NONE_SUPPORTED"><a href="#dom-mediaerror-media_err_none_supported">MEDIA_ERR_NONE_SUPPORTED</a></code>.</li>
+     <code><a href="#mediaerror">MediaError</a></code> object whose <code title="dom-MediaError-code"><a href="#dom-mediaerror-code">code</a></code> attribute is set to <code title="dom-MediaError-MEDIA_ERR_SRC_NOT_SUPPORTED"><a href="#dom-mediaerror-media_err_src_not_supported">MEDIA_ERR_SRC_NOT_SUPPORTED</a></code>.</li>
 
      <li><p>Set the element's <code title="dom-media-networkState"><a href="#dom-media-networkstate">networkState</a></code> attribute to
      the <a href="#dom-media-network_no_source" title="dom-media-NETWORK_NO_SOURCE">NETWORK_NO_SOURCE</a>
@@ -17744,28 +17755,38 @@
 
      <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> <a href="#queue-a-task">Queue a task</a> 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>If the node after <var title="">pointer</var> is the end
-       of the list, then jump to the step below labeled
-       <i>waiting</i>.</li>
+      <ol><li><p>Let <var title="">candidate</var> be null.</li>
+
+       <li><p>If the node after <var title="">pointer</var> is the end
+       of the list, then abort the task.</li>
 
        <li><p>If the node after <var title="">pointer</var> is a
        <code><a href="#the-source-element">source</a></code> element, let <var title="">candidate</var>
-       be that element; otherwise, let <var title="">candidate</var>
-       be null.</li>
+       be that element.</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>.</li>
 
-       <li><p>If <var title="">candidate</var> is null, restart the
-       step labelled <i>search loop</i> from the first
-       substep.</li>
+       <li><p>If <var title="">candidate</var> is null, restart these
+       substeps from the first substep. Otherwise, abort the
+       task.</li>
 
-      </ol></li>
+       <li><p><a href="#resolve-a-url" title="resolve a url">Resolve</a> the
+       <a href="#url">URL</a> given by the <var title="">candidate</var>
+       element's <code title="attr-source-src"><a href="#attr-source-src">src</a></code> attribute
+       relative to <var title="">candidate</var>.</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>
 
@@ -17779,7 +17800,7 @@
        <li><a href="#resolve-a-url" title="resolve a url">Resolving</a> the
        <a href="#url">URL</a> given by the <var title="">candidate</var>
        element's <code title="attr-source-src"><a href="#attr-source-src">src</a></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"><a href="#attr-source-type">type</a></code> attribute whose value,
        when parsed as a MIME type (including any codecs described by
@@ -17811,17 +17832,10 @@
 
      <li><p>Return to the step labeled <i>search loop</i>.</li>
 
-     <li><p><i>Waiting:</i> Set the <code title="dom-media-error"><a href="#dom-media-error">error</a></code> attribute to a new
-     <code><a href="#mediaerror">MediaError</a></code> object whose <code title="dom-MediaError-code"><a href="#dom-mediaerror-code">code</a></code> attribute is set to <code title="dom-MediaError-MEDIA_ERR_NONE_SUPPORTED"><a href="#dom-mediaerror-media_err_none_supported">MEDIA_ERR_NONE_SUPPORTED</a></code>.</li>
-
-     <li><p>Set the element's <code title="dom-media-networkState"><a href="#dom-media-networkstate">networkState</a></code> attribute to
+     <li><p><i>Waiting:</i> Set the element's <code title="dom-media-networkState"><a href="#dom-media-networkstate">networkState</a></code> attribute to
      the <a href="#dom-media-network_no_source" title="dom-media-NETWORK_NO_SOURCE">NETWORK_NO_SOURCE</a>
      value</li>
 
-     <li><p><a href="#queue-a-task">Queue a task</a> to <a href="#fire-a-progress-event">fire a progress
-     event</a> called <code title="event-error"><a href="#event-error">error</a></code> at the
-     <a href="#media-element">media element</a>.</li>
-
      <li><p>Set the element's <a href="#delaying-the-load-event-flag">delaying-the-load-event flag</a>
      to false. This stops <a href="#delay-the-load-event" title="delay the load event">delaying
      the load event</a>.</li>
Received on Wednesday, 29 April 2009 19:14:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 29 April 2009 19:14:39 GMT