- From: poot <cvsmail@w3.org>
- Date: Sun, 16 Nov 2008 04:31:45 +0900 (JST)
- To: public-html-diffs@w3.org
Make <source type> optional. Move canPlayType from navigator to HTMLMediaElement. Make it return a string instead of an integer. Fix up the candidate URL list generation. Make loadstart/play event sequencing deterministic. (whatwg r2404) play() http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-play 4.8.10.15 Security and privacy considerations http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#security-and-privacy-considerations HTMLMediaElement http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#htmlmediaelement media http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#attr-source-media ByteRanges http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#byteranges 4.8.10.4 Network states http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#network-states 4.8.10.5 Loading the media resource http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#loading-the-media-resource removeCueRanges(className) http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-removecueranges 5.6.2.2 Sample user interface http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#sample-handler-impl When a media element is potentially playing and its Document is an active document, its current playback position must increase monotonically at playbackRate units of media time per unit time of wall clock time. http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#media-playback 4.8.10.11 User interface http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#user-interface expose a user interface to the user http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#expose-a-user-interface-to-the-user NavigatorAbilities http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#navigatorabilities normalized TimeRanges object http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#normalized-timeranges-object addCueRange(className, id, start, end, pauseOnExit, enterCallback, exitCallback) http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-addcuerange loop http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#attr-media-loop type http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#attr-source-type networkState http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-networkstate 4.8.10.8 Cue ranges http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#cue-ranges volumechange http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#event-volumechange normalized ByteRanges object http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#normalized-byteranges-object begun flag http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#begun-flag 5.7 Offline Web applications http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#offline autoplay http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#attr-media-autoplay loop http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-loop NavigatorOnLine http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#navigatoronline NETWORK_LOADED http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-network_loaded 4.8.10.1 Error codes http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#error-codes 4.8.10.14 Event summary http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#mediaevents pixelratio http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#attr-source-pixelratio 4.8.10.10 Seeking http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#seeking pause() http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-pause cue ranges http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#cue-range error http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-error canPlayType(type) http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-navigator-canplaytype potentially playing http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#potentially-playing generate the list of potential media resources http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#generate-the-list-of-potential-media-resources totalBytes http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-totalbytes autoplay http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-autoplay seek http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-seek 4.8.10.9 Playing the media resource http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#playing-the-media-resource autoplaying flag http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#autoplaying-flag media element new resource task source http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#media-element-new-resource-task-source Status of this document http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#status-of-this-document 4.8.10.12 Time ranges http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#time-ranges seekable http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-seekable A vocabulary and associated APIs for HTML and XHTML http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#a-vocabulary-and-associated-apis-for-html-and-xhtml muted http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#dom-media-muted 4.8.10.7 The ready states http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#the-ready-states 4.8.11 The canvas element http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#the-canvas-element 4.8.10.6 Offsets into the media resource http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#offsets-into-the-media-resource A type that the user agent knows it cannot render http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#a-type-that-the-user-agent-knows-it-cannot-render Editor's Draft 15 November 2008 http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#editor-s-draft-date-zzz-9-june-2008 4.8.10.3 Media types http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#media-types 4.8.10.13 Byte ranges http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#byte-ranges TimeRanges http://people.w3.org/mike/diffs/html5/spec/Overview.1.1576.html#timeranges http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1575&r2=1.1576&f=h http://html5.org/tools/web-apps-tracker?from=2403&to=2404 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1575 retrieving revision 1.1576 diff -u -d -r1.1575 -r1.1576 --- Overview.html 14 Nov 2008 06:50:28 -0000 1.1575 +++ Overview.html 15 Nov 2008 19:28:51 -0000 1.1576 @@ -8,7 +8,7 @@ <p><a href=http://www.w3.org/><img alt=W3C height=48 src=http://www.w3.org/Icons/w3c_home width=72></a></p> <h1>HTML 5</h1> <h2 class="no-num no-toc" id=a-vocabulary-and-associated-apis-for-html-and-xhtml>A vocabulary and associated APIs for HTML and XHTML</h2> - <h2 class="no-num no-toc" id=editor-s-draft-date-zzz-9-june-2008><!-- "W3C Working Draft" --> Editor's Draft <!--ZZZ-->14 November 2008</h2> + <h2 class="no-num no-toc" id=editor-s-draft-date-zzz-9-june-2008><!-- "W3C Working Draft" --> Editor's Draft <!--ZZZ-->15 November 2008</h2> <dl><!-- ZZZ: update the month/day <dt>This Version:</dt> <dd><a href="http://www.w3.org/TR/2008/WD-html5-20080610/">http://www.w3.org/TR/2008/WD-html5-20080610/</a></dd> @@ -97,7 +97,7 @@ specification's progress along the W3C Recommendation track. <!--ZZZ:--> - This specification is the 14 November 2008 <!--ZZZ "Working Draft"-->Editor's Draft. + This specification is the 15 November 2008 <!--ZZZ "Working Draft"-->Editor's Draft. <!--:ZZZ--> </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href=http://www.whatwg.org/>WHATWG</a>. The two specifications are identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of) @@ -375,18 +375,19 @@ <ol> <li><a href=#error-codes><span class=secno>4.8.10.1 </span>Error codes</a></li> <li><a href=#location-of-the-media-resource><span class=secno>4.8.10.2 </span>Location of the media resource</a></li> - <li><a href=#network-states><span class=secno>4.8.10.3 </span>Network states</a></li> - <li><a href=#loading-the-media-resource><span class=secno>4.8.10.4 </span>Loading the media resource</a></li> - <li><a href=#offsets-into-the-media-resource><span class=secno>4.8.10.5 </span>Offsets into the media resource</a></li> - <li><a href=#the-ready-states><span class=secno>4.8.10.6 </span>The ready states</a></li> - <li><a href=#cue-ranges><span class=secno>4.8.10.7 </span>Cue ranges</a></li> - <li><a href=#playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the media resource</a></li> - <li><a href=#seeking><span class=secno>4.8.10.9 </span>Seeking</a></li> - <li><a href=#user-interface><span class=secno>4.8.10.10 </span>User interface</a></li> - <li><a href=#time-ranges><span class=secno>4.8.10.11 </span>Time ranges</a></li> - <li><a href=#byte-ranges><span class=secno>4.8.10.12 </span>Byte ranges</a></li> - <li><a href=#mediaevents><span class=secno>4.8.10.13 </span>Event summary</a></li> - <li><a href=#security-and-privacy-considerations><span class=secno>4.8.10.14 </span>Security and privacy considerations</a></ol></li> + <li><a href=#media-types><span class=secno>4.8.10.3 </span>Media types</a></li> + <li><a href=#network-states><span class=secno>4.8.10.4 </span>Network states</a></li> + <li><a href=#loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the media resource</a></li> + <li><a href=#offsets-into-the-media-resource><span class=secno>4.8.10.6 </span>Offsets into the media resource</a></li> + <li><a href=#the-ready-states><span class=secno>4.8.10.7 </span>The ready states</a></li> + <li><a href=#cue-ranges><span class=secno>4.8.10.8 </span>Cue ranges</a></li> + <li><a href=#playing-the-media-resource><span class=secno>4.8.10.9 </span>Playing the media resource</a></li> + <li><a href=#seeking><span class=secno>4.8.10.10 </span>Seeking</a></li> + <li><a href=#user-interface><span class=secno>4.8.10.11 </span>User interface</a></li> + <li><a href=#time-ranges><span class=secno>4.8.10.12 </span>Time ranges</a></li> + <li><a href=#byte-ranges><span class=secno>4.8.10.13 </span>Byte ranges</a></li> + <li><a href=#mediaevents><span class=secno>4.8.10.14 </span>Event summary</a></li> + <li><a href=#security-and-privacy-considerations><span class=secno>4.8.10.15 </span>Security and privacy considerations</a></ol></li> <li><a href=#the-canvas-element><span class=secno>4.8.11 </span>The <code>canvas</code> element</a> <ol> <li><a href=#the-2d-context><span class=secno>4.8.11.1 </span>The 2D context</a> @@ -595,8 +596,7 @@ <li><a href=#custom-handlers><span class=secno>5.6.2 </span>Custom protocol and content handlers</a> <ol> <li><a href=#security-and-privacy><span class=secno>5.6.2.1 </span>Security and privacy</a></li> - <li><a href=#sample-handler-impl><span class=secno>5.6.2.2 </span>Sample user interface</a></ol></li> - <li><a href=#client-abilities><span class=secno>5.6.3 </span>Client abilities</a></ol></li> + <li><a href=#sample-handler-impl><span class=secno>5.6.2.2 </span>Sample user interface</a></ol></ol></li> <li><a href=#offline><span class=secno>5.7 </span>Offline Web applications</a> <ol> <li><a href=#introduction-0><span class=secno>5.7.1 </span>Introduction</a></li> @@ -13601,10 +13601,10 @@ be a <a href=#valid-url>valid URL</a>. This attribute must be present.<p>The <dfn id=attr-source-type title=attr-source-type><code>type</code></dfn> attribute gives the type of the <a href=#media-resource>media resource</a>, to help the user agent determine if it can play this <a href=#media-resource>media - resource</a> before fetching it. Its value must be a MIME - type. The <code title="">codecs</code> parameter may be specified - and might be necessary to specify exactly how the resource is - encoded. <a href=#references>[RFC2046]</a> <a href=#references>[RFC4281]</a><div class=example> + resource</a> before fetching it. If specified, its value must be + a MIME type. The <code title="">codecs</code> parameter may be + specified and might be necessary to specify exactly how the resource + is encoded. <a href=#references>[RFC2046]</a> <a href=#references>[RFC4281]</a><div class=example> <p>The following list shows some examples of how to use the <code title="">codecs=</code> MIME parameter in the <code title=attr-source-type><a href=#attr-source-type>type</a></code> attribute.</p> @@ -13693,10 +13693,7 @@ attribute gives the intended media type of the <a href=#media-resource>media resource</a>, to help the user agent determine if this <a href=#media-resource>media resource</a> is useful to the user before fetching - it. Its value must be a valid <a href=#mq>media query</a>. <a href=#references>[MQ]</a><p>Either the <code title=attr-source-type><a href=#attr-source-type>type</a></code> attribute, - the <code title=attr-source-media><a href=#attr-source-media>media</a></code> attribute or both, - must be specified, unless this is the last <code><a href=#the-source-element>source</a></code> - element child of the parent element.<p>The <dfn id=attr-source-pixelratio title=attr-source-pixelratio><code>pixelratio</code></dfn> + it. Its value must be a valid <a href=#mq>media query</a>. <a href=#references>[MQ]</a><p>The <dfn id=attr-source-pixelratio title=attr-source-pixelratio><code>pixelratio</code></dfn> attribute allows the author to specify the pixel ratio of anamorphic <a href=#media-resource title="media resource">media resources</a> that do not self-describe their <a href=#concept-video-adjusted-ratio title=concept-video-adjusted-ratio>pixel @@ -13740,6 +13737,7 @@ readonly attribute <a href=#byteranges>ByteRanges</a> <a href=#dom-media-bufferedbytes title=dom-media-bufferedBytes>bufferedBytes</a>; readonly attribute unsigned long <a href=#dom-media-totalbytes title=dom-media-totalBytes>totalBytes</a>; void <a href=#dom-media-load title=dom-media-load>load</a>(); + DOMString <a href=#dom-navigator-canplaytype title=dom-navigator-canPlayType>canPlayType</a>(in DOMString type); // ready state const unsigned short <a href=#dom-media-have_nothing title=dom-media-HAVE_NOTHING>HAVE_NOTHING</a> = 0; @@ -13818,9 +13816,7 @@ implicit loads. Unless otherwise specified, the <a href=#task-source>task source</a> for all the tasks <a href=#queue-a-task title="queue a task">queued</a> in this section and its subsections is the - <a href=#media-element-event-task-source>media element event task source</a>.<p>The <code title=dom-navigator-canPlayType><a href=#dom-navigator-canplaytype>canPlayType()</a></code> - method can be used to probe the user agent to determine what types - are supported.<h5 id=error-codes><span class=secno>4.8.10.1 </span>Error codes</h5><p>All <a href=#media-element title="media element">media elements</a> have an + <a href=#media-element-event-task-source>media element event task source</a>.<h5 id=error-codes><span class=secno>4.8.10.1 </span>Error codes</h5><p>All <a href=#media-element title="media element">media elements</a> have an associated error status, which records the last error the element encountered since the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method was last invoked. The <dfn id=dom-media-error title=dom-media-error><code>error</code></dfn> attribute, on @@ -13928,21 +13924,22 @@ <p>If all the following conditions are true:</p> - <ul><li>The <var title="">candidate</var> element has a <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute</li> + <ul><li>The <var title="">candidate</var> element has a <code title=attr-source-src><a href=#attr-source-src>src</a></code> attribute.</li> <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 does - not fail</li> + not fail.</li> - <li>The <var title="">candidate</var> element has a <code title=attr-source-type><a href=#attr-source-type>type</a></code> attribute and that - attribute's value, when parsed as a MIME type (including any - codecs described by the <code title="">codec</code> parameter), - does not represent a type that the user agent knows it cannot - render <a href=#references>[RFC2046]</a> <a href=#references>[RFC4281]</a></li> + <li>The <var title="">candidate</var> element either has no <code title=attr-source-type><a href=#attr-source-type>type</a></code> attribute, or its <code title=attr-source-type><a href=#attr-source-type>type</a></code> attribute's value, when + parsed as a MIME type (including any codecs described by the + <code title="">codec</code> parameter), does not represent + <a href=#a-type-that-the-user-agent-knows-it-cannot-render>a type that the user agent knows it cannot + render</a>.</li> - <li>The <var title="">candidate</var> element has a <code title=attr-source-media><a href=#attr-source-media>media</a></code> attribute and that - attribute's value, when processed according to the rules for <a href=#mq>media queries</a>, matches the current environment <a href=#references>[MQ]</a></li> + <li>The <var title="">candidate</var> element either has no <code title=attr-source-media><a href=#attr-source-media>media</a></code> attribute, or its <code title=attr-source-media><a href=#attr-source-media>media</a></code> attribute's value, when + processed according to the rules for <a href=#mq>media + queries</a>, matches the current environment. <a href=#references>[MQ]</a></li> </ul><p>...then append an item to the <var title="">result</var> list consisting of the <a href=#absolute-url>absolute URL</a> resulting from <a href=#resolve-a-url title="resolve a url">resolving</a> the <a href=#url>URL</a> given @@ -13962,7 +13959,61 @@ <li><p>Return <var title="">result</var>.</li> - </ol><h5 id=network-states><span class=secno>4.8.10.3 </span>Network states</h5><p>As <a href=#media-element title="media element">media elements</a> interact + </ol><h5 id=media-types><span class=secno>4.8.10.3 </span>Media types</h5><p>A <a href=#media-resource>media resource</a> can be described in terms of its + <em>type</em>, specifically a MIME type, optionally with a <code title="">codecs</code> parameter. <a href=#references>[RFC2046]</a> <a href=#references>[RFC4281]</a>.<p>Types are usually somewhat incomplete descriptions; for example + "<code title="">video/mpeg</code>" doesn't say anything except what + the container type is, and even a type like "<code title="">video/mp4; codecs="avc1.42E01E, + mp4a.40.2"</code>" doesn't include information like the actual + bitrate (only the maximum bitrate). Thus, given a type, a user agent + can often only know whether it <em>might</em> be able to play + media of that type (with varying levels of confidence), or whether + it definitely <em>cannot</em> play media of that type.<p><dfn id=a-type-that-the-user-agent-knows-it-cannot-render>A type that the user agent knows it cannot render</dfn> is + one that describes a resource that the user agent definitely does + not support, for example because it doesn't recognise the container + type, or it doesn't support the listed codecs.<p>The <dfn id=dom-navigator-canplaytype title=dom-navigator-canPlayType><code>canPlayType(<var title="">type</var>)</code></dfn> method must return the string + "<code title="">no</code>" if <var title="">type</var> is <a href=#a-type-that-the-user-agent-knows-it-cannot-render>a + type that the user agent knows it cannot render</a>; it must + return "<code title="">probably</code>" if the user agent is + confident that the type represents a <a href=#media-resource>media resource</a> + that it can render if used in with this <code><a href=#audio>audio</a></code> or + <code><a href=#video>video</a></code> element; and it must return "<code title="">maybe</code>" otherwise. Implementors are encouraged to + return "<code title="">maybe</code>" unless the type can be + confidently established as being supported or not. Generally, a user + agent should never return "<code title="">probably</code>" if the + type doesn't have a <code title="">codecs</code> parameter.<div class=example> + + <p>This script tests to see if the user agent supports a + (fictional) new format to dynamically decide whether to use a + <code><a href=#video>video</a></code> element or a plugin:</p> + + <pre><section id="video"> + <p><a href="playing-cats.nfv">Download video</a></p> +</section> +<script> + var videoSection = document.getElementById('video'); + var videoElement = document.createElement('video'); + var support = videoElement.canPlayType('video/x-new-fictional-format;codecs="kittens,bunnies"'); + if (support != "probably" && "New Fictional Video Plug-in" in navigator.plugins) { + // not confident of browser support + // but we have a plugin + // so use plugin instead + videoElement = document.createElement("embed"); + } else if (support == "no") { + // no support from browser and no plugin + // do nothing + videoElement = null; + } + if (videoElement) { + while (videoSection.hasChildNodes()) + videoSection.removeChild(videoSection.firstChild); + videoElement.setAttribute("src", "playing-cats.nfv"); + videoSection.appendChild(videoElement); + } +</script></pre> + + </div><p class=note>To express the type of a <a href=#media-resource>media resource</a> + to allow the user agent to avoid downloading resources it can't + render, authors can use the <code><a href=#the-source-element>source</a></code> element's <code title=attr-source-type><a href=#attr-source-type>type</a></code> attribute.<h5 id=network-states><span class=secno>4.8.10.4 </span>Network states</h5><p>As <a href=#media-element title="media element">media elements</a> interact with the network, their current network activity is represented by the <dfn id=dom-media-networkstate title=dom-media-networkState><code>networkState</code></dfn> attribute. On getting, it must return the current network state of @@ -13990,7 +14041,7 @@ </dl><p>The algorithm for the <code title=dom-media-load><a href=#dom-media-load>load()</a></code> method defined below describes exactly when the <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute changes value and what events fire to indicate changes in this state.<p class=note>Some resources, e.g. streaming Web radio, can never - reach the <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code> state.<h5 id=loading-the-media-resource><span class=secno>4.8.10.4 </span>Loading the media resource</h5><p>All <a href=#media-element title="media element">media elements</a> have a + reach the <code title=dom-media-NETWORK_LOADED><a href=#dom-media-network_loaded>NETWORK_LOADED</a></code> state.<h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the media resource</h5><p>All <a href=#media-element title="media element">media elements</a> have a <dfn id=begun-flag>begun flag</dfn>, which must begin in the false state, and an <dfn id=autoplaying-flag>autoplaying flag</dfn>, which must begin in the true state.<p>When the <dfn id=dom-media-load title=dom-media-load><code>load()</code></dfn> method on a <a href=#media-element>media element</a> is invoked, the user agent @@ -14074,6 +14125,10 @@ <li><p>Set the <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>Set the <a href=#begun-flag>begun flag</a> to true and <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-loadstart><a href=#event-loadstart>loadstart</a></code> at the <a href=#media-element>media + element</a>.</li> + <li> <p>The method must return, but these steps must continue.</p> @@ -14087,10 +14142,6 @@ <!-- SYNCHRONOUS / ASYNCHRONOUS BOUNDARY FOR EVENT DISPATCH --> - <li><p>Set the <a href=#begun-flag>begun flag</a> to true and <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-loadstart><a href=#event-loadstart>loadstart</a></code> at the <a href=#media-element>media - element</a>.</li> - <li> <p><i>Candidate loop</i>: For each item in <var title="">candidates</var>, if any, and in the same order as they @@ -14405,7 +14456,7 @@ available, the attribute must return 0.<p>User agents may discard previously buffered data.<p class=note>Thus, a time or byte position included within a range of the objects return by the <code title=dom-media-buffered><a href=#dom-media-buffered>buffered</a></code> or <code title=dom-media-bufferedBytes><a href=#dom-media-bufferedbytes>bufferedBytes</a></code> attributes at one time can end up being not included in the range(s) of objects - returned by the same attributes at a later time.<h5 id=offsets-into-the-media-resource><span class=secno>4.8.10.5 </span>Offsets into the media resource</h5><p>The <dfn id=dom-media-duration title=dom-media-duration><code>duration</code></dfn> + returned by the same attributes at a later time.<h5 id=offsets-into-the-media-resource><span class=secno>4.8.10.6 </span>Offsets into the media resource</h5><p>The <dfn id=dom-media-duration title=dom-media-duration><code>duration</code></dfn> attribute must return the length of the <a href=#media-resource>media resource</a>, in seconds. If no <a href=#media-data>media data</a> is available, then the attributes must return 0. If <a href=#media-data>media data</a> is available @@ -14436,7 +14487,7 @@ indicates that the <a href=#media-element>media element</a> is to seek back to the start of the <a href=#media-resource>media resource</a> upon reaching the end.<p>The <dfn id=dom-media-loop title=dom-media-loop><code>loop</code></dfn> DOM attribute must <a href=#reflect>reflect</a> the content attribute of the - same name.<h5 id=the-ready-states><span class=secno>4.8.10.6 </span>The ready states</h5><p><a href=#media-element title="media element">Media elements</a> have a + same name.<h5 id=the-ready-states><span class=secno>4.8.10.7 </span>The ready states</h5><p><a href=#media-element title="media element">Media elements</a> have a <i>ready state</i>, which describes to what degree they are ready to be rendered at the <a href=#current-playback-position>current playback position</a>. The possible values are as follows; the ready state of a media element @@ -14576,7 +14627,7 @@ automatically begin playback of the <a href=#media-resource>media resource</a> as soon as it can do so without stopping.<p>The <dfn id=dom-media-autoplay title=dom-media-autoplay><code>autoplay</code></dfn> DOM attribute must <a href=#reflect>reflect</a> the content attribute of the - same name.<h5 id=cue-ranges><span class=secno>4.8.10.7 </span>Cue ranges</h5><p><a href=#media-element title="media element">Media elements</a> have a set of + same name.<h5 id=cue-ranges><span class=secno>4.8.10.8 </span>Cue ranges</h5><p><a href=#media-element title="media element">Media elements</a> have a set of <dfn id=cue-range title="cue range">cue ranges</dfn>. Each cue range is made up of the following information:<dl><dt>A class name</dt> <dd>A group of related ranges can be given the same class name so @@ -14615,7 +14666,7 @@ than the start time and less than the end time, and false otherwise.<p>The <dfn id=dom-media-removecueranges title=dom-media-removeCueRanges><code>removeCueRanges(<var title="">className</var>)</code></dfn> method must, when called, remove all the <a href=#cue-range title="cue range">cue ranges</a> of the - <a href=#media-element>media element</a> which have the class name <var title="">className</var>.<h5 id=playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the media resource</h5><p>The <dfn id=dom-media-paused title=dom-media-paused><code>paused</code></dfn> + <a href=#media-element>media element</a> which have the class name <var title="">className</var>.<h5 id=playing-the-media-resource><span class=secno>4.8.10.9 </span>Playing the media resource</h5><p>The <dfn id=dom-media-paused title=dom-media-paused><code>paused</code></dfn> attribute represents whether the <a href=#media-element>media element</a> is paused or not. The attribute must initially be true.<p>A <a href=#media-element>media element</a> is said to be <dfn id=potentially-playing>potentially playing</dfn> when its <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> @@ -14746,7 +14797,7 @@ <li><p>If the fourth step above changed the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>, the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> - called <code title=event-pause><a href=#event-pause>play</a></code> at the + called <code title=event-play><a href=#event-play>play</a></code> at the element.</li> </ol><hr><p>When the <dfn id=dom-media-pause title=dom-media-pause><code>pause()</code></dfn> @@ -14871,7 +14922,7 @@ agent must act as if the <code title=dom-media-pause><a href=#dom-media-pause>pause()</a></code> method had been invoked.<p class=note>If the <a href=#media-element>media element</a>'s <code>Document</code> stops being an active document, then the playback will <a href=#media-playback>stop</a> until the document - is active again.<h5 id=seeking><span class=secno>4.8.10.9 </span>Seeking</h5><p>The <dfn id=dom-media-seeking title=dom-media-seeking><code>seeking</code></dfn> + is active again.<h5 id=seeking><span class=secno>4.8.10.10 </span>Seeking</h5><p>The <dfn id=dom-media-seeking title=dom-media-seeking><code>seeking</code></dfn> attribute must initially have the value false.<p>When the user agent is required to <dfn id=dom-media-seek title=dom-media-seek>seek</dfn> to a particular <var title="">new playback position</var> in the <a href=#media-resource>media resource</a>, it means that the user agent must run the following steps:<ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, then the user @@ -14950,7 +15001,7 @@ element</a> could play in a non-linear fashion. If this happens, the user agent must act as if the algorithm for <a href=#dom-media-seek title=dom-media-seek>seeking</a> was used whenever the <a href=#current-playback-position>current playback position</a> changes in a discontinuous - fashion (so that the relevant events fire).<h5 id=user-interface><span class=secno>4.8.10.10 </span>User interface</h5><p>The <dfn id=attr-media-controls title=attr-media-controls><code>controls</code></dfn> + fashion (so that the relevant events fire).<h5 id=user-interface><span class=secno>4.8.10.11 </span>User interface</h5><p>The <dfn id=attr-media-controls title=attr-media-controls><code>controls</code></dfn> attribute is a <a href=#boolean-attribute>boolean attribute</a>. If the attribute is present, or if the <a href=#media-element>media element</a> is <a href=#without-script>without script</a>, then the user agent should <dfn id=expose-a-user-interface-to-the-user>expose a user @@ -14999,7 +15050,7 @@ <code title=dom-media-volume><a href=#dom-media-volume>volume</a></code> attributes are changed, the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-volumechange><a href=#event-volumechange>volumechange</a></code> at the <a href=#media-element>media - element</a>.<h5 id=time-ranges><span class=secno>4.8.10.11 </span>Time ranges</h5><p>Objects implementing the <code><a href=#timeranges>TimeRanges</a></code> interface + element</a>.<h5 id=time-ranges><span class=secno>4.8.10.12 </span>Time ranges</h5><p>Objects implementing the <code><a href=#timeranges>TimeRanges</a></code> interface represent a list of ranges (periods) of time.<pre class=idl>interface <dfn id=timeranges>TimeRanges</dfn> { readonly attribute unsigned long <a href=#dom-timeranges-length title=dom-TimeRanges-length>length</a>; float <a href=#dom-timeranges-start title=dom-TimeRanges-start>start</a>(in unsigned long index); @@ -15024,7 +15075,7 @@ </ul><p>In other words, the ranges in such an object are ordered, don't overlap, aren't empty, and don't touch (adjacent ranges are folded into one bigger range).<p>The timelines used by the objects returned by the <code title=dom-media-buffered><a href=#dom-media-buffered>buffered</a></code>, <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> and <code title=dom-media-played><a href=#dom-media-played>played</a></code> DOM attributes of <a href=#media-element title="media element">media elements</a> must be the same as that - element's <a href=#media-resource>media resource</a>'s timeline.<h5 id=byte-ranges><span class=secno>4.8.10.12 </span>Byte ranges</h5><p>Objects implementing the <code><a href=#byteranges>ByteRanges</a></code> interface + element's <a href=#media-resource>media resource</a>'s timeline.<h5 id=byte-ranges><span class=secno>4.8.10.13 </span>Byte ranges</h5><p>Objects implementing the <code><a href=#byteranges>ByteRanges</a></code> interface represent a list of ranges of bytes.<pre class=idl>interface <dfn id=byteranges>ByteRanges</dfn> { readonly attribute unsigned long <a href=#dom-byteranges-length title=dom-ByteRanges-length>length</a>; unsigned long <a href=#dom-byteranges-start title=dom-ByteRanges-start>start</a>(in unsigned long index); @@ -15050,7 +15101,7 @@ </ul><p>In other words, the ranges in such an object are ordered, don't overlap, aren't empty, and don't touch (adjacent ranges are folded - into one bigger range).<h5 id=mediaevents><span class=secno>4.8.10.13 </span>Event summary</h5><p>The following events fire on <a href=#media-element title="media element">media + into one bigger range).<h5 id=mediaevents><span class=secno>4.8.10.14 </span>Event summary</h5><p>The following events fire on <a href=#media-element title="media element">media elements</a> as part of the processing model described above:<table><thead><tr><th>Event name <th>Interface <th>Dispatched when... @@ -15150,7 +15201,7 @@ <td><code>Event</code> <td>Either the <code title=dom-media-volume><a href=#dom-media-volume>volume</a></code> attribute or the <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code> attribute has changed. Fired after the relevant attribute's setter has returned. <td> - </table><h5 id=security-and-privacy-considerations><span class=secno>4.8.10.14 </span>Security and privacy considerations</h5><p class=XXX>Talk about making sure interactive media files + </table><h5 id=security-and-privacy-considerations><span class=secno>4.8.10.15 </span>Security and privacy considerations</h5><p class=XXX>Talk about making sure interactive media files (e.g. SVG) don't have access to the container DOM (XSS potential); talk about not exposing any sensitive data like metadata from tracks in the media files (intranet snooping risk)<h4 id=the-canvas-element><span class=secno>4.8.11 </span>The <dfn id=canvas><code>canvas</code></dfn> element</h4><dl class=element><dt>Categories</dt> @@ -27421,18 +27472,18 @@ readonly attribute boolean <a href=#dom-navigator-online title=dom-navigator-onLine>onLine</a>; }; -[NoInterfaceObject] interface <dfn id=navigatorbrowsingcontextabilities>NavigatorBrowsingContextAbilities</dfn> { +[NoInterfaceObject] interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> { // content handler registration void <a href=#dom-navigator-registerprotocolhandler title=dom-navigator-registerProtocolHandler>registerProtocolHandler</a>(in DOMString protocol, in DOMString url, in DOMString title); void <a href=#dom-navigator-registercontenthandler title=dom-navigator-registerContentHandler>registerContentHandler</a>(in DOMString mimeType, in DOMString url, in DOMString title); -<!-- XXX cookieEnabled geolocator javaEnabled mozIsLocallyAvailable plugins preference - readonly attribute <span>MimeTypeArray</span> <span title="dom-navigator-mimeTypes">mimeTypes</span>;--> - // abilities - short <a href=#dom-navigator-canplaytype title=dom-navigator-canPlayType>canPlayType</a>(in DOMString type); -};</pre><p>Objects implementing the <code><a href=#navigator>Navigator</a></code> interface must +<!-- XXX cookieEnabled geolocator javaEnabled mozIsLocallyAvailable preference + readonly attribute <span>MimeTypeArray</span> <span title="dom-navigator-mimeTypes">mimeTypes</span>; + readonly attribute <span>PluginArray</span> <span title="dom-navigator-plugins">plugins</span>; + (the latter is used in a <video> element demo now) +-->};</pre><p>Objects implementing the <code><a href=#navigator>Navigator</a></code> interface must also implement the <a href=#navigatorid>NavigatorID</a>, <a href=#navigatoronline>NavigatorOnLine</a>, and - <a href=#navigatorbrowsingcontextabilities>NavigatorBrowsingContextAbilities</a> interfaces. (These + <a href=#navigatorabilities>NavigatorAbilities</a> interfaces. (These interfaces are defined separately so that other specifications can re-use parts of the <code><a href=#navigator>Navigator</a></code> interface.)</p><!-- XXX also, see window.external.AddSearchProvider() and similar DOM APIs from IE --><!-- XXX also, could expose languages: <dt><dfn title="dom-navigator-browserLanguage"><code>browserLanguage</code></dfn></dt> <!- - Opera and IE only - -> @@ -27720,12 +27771,7 @@ sections, will redirect the user to "http://kittens.example.org/?show=x-meow%3AS2l0dGVucyBhcmUgdGhlIGN1dGVzdCE%253D".<p>The <code title=dom-navigator-registerContentHandler><a href=#dom-navigator-registercontenthandler>registerContentHandler()</a></code> method would work equivalently, but for unknown MIME types instead - of unknown protocols.<h4 id=client-abilities><span class=secno>5.6.3 </span>Client abilities</h4><p>The <dfn id=dom-navigator-canplaytype title=dom-navigator-canPlayType><code>canPlayType(<var title="">type</var>)</code></dfn> method must return 1 if <var title="">type</var> is a MIME type that the user agent is confident - represents a <a href=#media-resource>media resource</a> that it can render if used - in a <code><a href=#audio>audio</a></code> or <code><a href=#video>video</a></code> element, 0 if it - cannot determine whether it could do so, and −1 if it is - confident that it would not be able to render resources of that - type.<h3 id=offline><span class=secno>5.7 </span>Offline Web applications</h3><h4 id=introduction-0><span class=secno>5.7.1 </span>Introduction</h4><p><em>This section is non-normative.</em><p class=XXX>...<h4 id=appcache><span class=secno>5.7.2 </span>Application caches</h4><p>An <dfn id=application-cache>application cache</dfn> is a collection of resources. An + of unknown protocols.<h3 id=offline><span class=secno>5.7 </span>Offline Web applications</h3><h4 id=introduction-0><span class=secno>5.7.1 </span>Introduction</h4><p><em>This section is non-normative.</em><p class=XXX>...<h4 id=appcache><span class=secno>5.7.2 </span>Application caches</h4><p>An <dfn id=application-cache>application cache</dfn> is a collection of resources. An application cache is identified by the <a href=#absolute-url>absolute URL</a> of a resource manifest which is used to populate the cache.<p>Application caches are versioned, and there can be different instances of caches for the same manifest URL, each having a
Received on Saturday, 15 November 2008 19:32:30 UTC