Skip to content
Browse files

[] (0) Add navigator.canPlayType() to introspect video and audio types.

git-svn-id: http://svn.whatwg.org/webapps@2332 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent ffebc05 commit a8baf350f1dbf3f5619958ce89bdf55dc684d9f8 @Hixie Hixie committed
Showing with 42 additions and 3 deletions.
  1. +21 −2 index
  2. +21 −1 source
View
23 index
@@ -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 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
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 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
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 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
+ <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 &minus;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>
View
22 source
@@ -17809,6 +17809,9 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {
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 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
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 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
+ <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 &#x2212;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>

0 comments on commit a8baf35

Please sign in to comment.
Something went wrong with that request. Please try again.