Skip to content

Commit

Permalink
[gw] (2) canPlayType() should return something that ToBoolean()s to f…
Browse files Browse the repository at this point in the history
…alse in the negative case, for sanity's sake.

git-svn-id: http://svn.whatwg.org/webapps@3384 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 10, 2009
1 parent 0386601 commit 62ca594
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 31 deletions.
29 changes: 14 additions & 15 deletions index
Expand Up @@ -20126,25 +20126,24 @@ interface <dfn id=cuerangecallback>CueRangeCallback</dfn> {

<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>

Expand All @@ -20166,7 +20165,7 @@ interface <dfn id=cuerangecallback>CueRangeCallback</dfn> {
// 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;
Expand Down
32 changes: 16 additions & 16 deletions source
Expand Up @@ -21579,9 +21579,9 @@ interface <dfn>CueRangeCallback</dfn> {

<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>

Expand All @@ -21590,18 +21590,18 @@ interface <dfn>CueRangeCallback</dfn> {
<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>

Expand All @@ -21623,7 +21623,7 @@ interface <dfn>CueRangeCallback</dfn> {
// 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;
Expand Down

0 comments on commit 62ca594

Please sign in to comment.