[html5] r3384 - [gw] (2) canPlayType() should return something that ToBoolean()s to false in the [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Jul 9 21:36:49 PDT 2009


Author: ianh
Date: 2009-07-09 21:36:47 -0700 (Thu, 09 Jul 2009)
New Revision: 3384

Modified:
   index
   source
Log:
[gw] (2) canPlayType() should return something that ToBoolean()s to false in the negative case, for sanity's sake.

Modified: index
===================================================================
--- index	2009-07-10 04:34:09 UTC (rev 3383)
+++ index	2009-07-10 04:36:47 UTC (rev 3384)
@@ -20126,25 +20126,24 @@
 
    <dd>
 
-    <p>Returns "no", "maybe", or "probably" based on how confident the
-    user agent is that it can play media resources of the given
-    type.</p>
+    <p>Returns the empty string (a negative response), "maybe", or
+    "probably" based on how confident the user agent is that it can
+    play media resources of the given type.</p>
 
    </dd>
 
   </dl><div class=impl>
 
-  <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.</p>
+  <p>The <dfn id=dom-navigator-canplaytype title=dom-navigator-canPlayType><code>canPlayType(<var title="">type</var>)</code></dfn> method must return the empty
+  string 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.</p>
 
   </div>
 
@@ -20166,7 +20165,7 @@
    // but we have a plugin
    // so use plugin instead
    videoElement = document.createElement("embed");
- } else if (support == "no") {
+ } else if (support == "") {
    // no support from browser and no plugin
    // do nothing
    videoElement = null;

Modified: source
===================================================================
--- source	2009-07-10 04:34:09 UTC (rev 3383)
+++ source	2009-07-10 04:36:47 UTC (rev 3384)
@@ -21579,9 +21579,9 @@
 
    <dd>
 
-    <p>Returns "no", "maybe", or "probably" based on how confident the
-    user agent is that it can play media resources of the given
-    type.</p>
+    <p>Returns the empty string (a negative response), "maybe", or
+    "probably" based on how confident the user agent is that it can
+    play media resources of the given type.</p>
 
    </dd>
 
@@ -21590,18 +21590,18 @@
   <div class="impl">
 
   <p>The <dfn 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 <span>a
-  type that the user agent knows it cannot render</span>; it must
-  return "<code title="">probably</code>" if the user agent is
-  confident that the type represents a <span>media resource</span>
-  that it can render if used in with this <code>audio</code> or
-  <code>video</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.</p>
+  title="">type</var>)</code></dfn> method must return the empty
+  string if <var title="">type</var> is <span>a type that the user
+  agent knows it cannot render</span>; it must return "<code
+  title="">probably</code>" if the user agent is confident that the
+  type represents a <span>media resource</span> that it can render if
+  used in with this <code>audio</code> or <code>video</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.</p>
 
   </div>
 
@@ -21623,7 +21623,7 @@
    // but we have a plugin
    // so use plugin instead
    videoElement = document.createElement("embed");
- } else if (support == "no") {
+ } else if (support == "") {
    // no support from browser and no plugin
    // do nothing
    videoElement = null;




More information about the Commit-Watchers mailing list