[html5] r2332 - [] (0) Add navigator.canPlayType() to introspect video and audio types.
whatwg at whatwg.org
whatwg at whatwg.org
Tue Oct 14 17:57:27 PDT 2008
Author: ianh
Date: 2008-10-14 17:57:26 -0700 (Tue, 14 Oct 2008)
New Revision: 2332
Modified:
index
source
Log:
[] (0) Add navigator.canPlayType() to introspect video and audio types.
Modified: index
===================================================================
--- index 2008-10-15 00:45:23 UTC (rev 2331)
+++ index 2008-10-15 00:57:26 UTC (rev 2332)
@@ -653,7 +653,8 @@
<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></ol></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=#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>
@@ -16687,6 +16688,9 @@
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>
+ <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.</p>
<h5 id=error-codes><span class=secno>4.8.10.1 </span>Error codes</h5>
@@ -33411,10 +33415,14 @@
readonly attribute boolean <a href=#dom-navigator-online title=dom-navigator-onLine>onLine</a>;
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);
+
+ // abilities<!--
+ XXX cookieEnabled geolocator javaEnabled mozIsLocallyAvailable plugins preference
+ readonly attribute <span>MimeTypeArray</span> <span title="dom-navigator-mimeTypes">mimeTypes</span>;-->
+ short <a href=#dom-navigator-canplaytype title=dom-navigator-canPlayType>canPlayType</a>(in DOMString type);
};</pre>
<!-- XXX also, see window.external.AddSearchProvider() and similar DOM APIs from IE -->
- <!-- XXX also, see: cookieEnabled geolocator javaEnabled mimeTypes mozIsLocallyAvailable plugins preference -->
<!-- XXX also, could expose languages:
<dt><dfn title="dom-navigator-browserLanguage"><code>browserLanguage</code></dfn></dt> <!- - Opera and IE only - ->
@@ -33784,6 +33792,17 @@
+ <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.</p>
+
+
+
<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>
Modified: source
===================================================================
--- source 2008-10-15 00:45:23 UTC (rev 2331)
+++ source 2008-10-15 00:57:26 UTC (rev 2332)
@@ -17809,6 +17809,9 @@
task">queued</span> in this section and its subsections is the
<span>media element event task source</span>.</p>
+ <p>The <code title="dom-navigator-canPlayType">canPlayType()</code>
+ method can be used to probe the user agent to determine what types
+ are supported.</p>
<h5>Error codes</h5>
@@ -37931,10 +37934,14 @@
readonly attribute boolean <span title="dom-navigator-onLine">onLine</span>;
void <span title="dom-navigator-registerProtocolHandler">registerProtocolHandler</span>(in DOMString protocol, in DOMString url, in DOMString title);
void <span title="dom-navigator-registerContentHandler">registerContentHandler</span>(in DOMString mimeType, in DOMString url, in DOMString title);
+
+ // abilities<!--
+ XXX cookieEnabled geolocator javaEnabled mozIsLocallyAvailable plugins preference
+ readonly attribute <span>MimeTypeArray</span> <span title="dom-navigator-mimeTypes">mimeTypes</span>;-->
+ short <span title="dom-navigator-canPlayType">canPlayType</span>(in DOMString type);
};</pre>
<!-- XXX also, see window.external.AddSearchProvider() and similar DOM APIs from IE -->
- <!-- XXX also, see: cookieEnabled geolocator javaEnabled mimeTypes mozIsLocallyAvailable plugins preference -->
<!-- XXX also, could expose languages:
<dt><dfn title="dom-navigator-browserLanguage"><code>browserLanguage</code></dfn></dt> <!- - Opera and IE only - ->
@@ -38335,6 +38342,19 @@
+ <h4>Client abilities</h4>
+
+ <p>The <dfn 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 <span>media resource</span> that it can render if used
+ in a <code>audio</code> or <code>video</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.</p>
+
+
+
<h3 id="offline">Offline Web applications</h3>
<h4>Introduction</h4>
More information about the Commit-Watchers
mailing list