W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2008

[whatwg] Scripted querying of <video> capabilities

From: Kristof Zelechovski <giecrilj@stegny.2a.pl>
Date: Wed, 15 Oct 2008 20:23:46 +0200
Message-ID: <2589345C7126492CBF72B846658F03B2@POCZTOWIEC>
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@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.
Received on Wednesday, 15 October 2008 11:23:46 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:06 UTC