[whatwg] Scripted querying of <video> capabilities

Kristof Zelechovski giecrilj at stegny.2a.pl
Wed Oct 15 11:23:46 PDT 2008


That assignment makes the intuitive code "if(canPlayType(_))" incorrect.
"Cannot" should be 0, and enumeration symbols should be provided.
Chris

-----Original Message-----
From: whatwg-bounces at lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Ian Hickson
Sent: Wednesday, October 15, 2008 10:44 AM
To: Maciej Stachowiak; Robert O'Callahan; Dave Singer; Nils Dagsson Moskopp;
Eric Carlson
Cc: WHATWG List
Subject: Re: [whatwg] Scripted querying of <video> capabilities


On Tue, 14 Oct 2008, Robert O'Callahan wrote:
> On Tue, Oct 14, 2008 at 12:13 PM, Maciej Stachowiak <mjs at apple.com> wrote:
> 
> > While the underlying media frameworks can't necessarily answer, "if I 
> > give you a file with this MIME type, can you play it?", they can at 
> > least give a yes/no/maybe answer, which can still be quite helpful, 
> > since the UA will know it does not need to check some media streams at 
> > all.
> 
> I agree. If the API lets us answer "maybe", there is not much need or 
> temptation to lie, and we can still return information that could be 
> useful to scripts.

I have added window.navigator.canPlayType(mimeType). It returns 1, 0, or 
-1 to represent positive, neutral, and negative responses.







More information about the whatwg mailing list