W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2009

[whatwg] Serving up Theora <video> in the real world

From: Maciej Stachowiak <mjs@apple.com>
Date: Sat, 11 Jul 2009 12:10:53 -0700
Message-ID: <70964704-93A5-4E97-AB36-D7B1E7975A18@apple.com>

On Jul 10, 2009, at 6:31 PM, Robert O'Callahan wrote:

> On Sat, Jul 11, 2009 at 5:23 AM, Aryeh Gregor <Simetrical+w3c at gmail.com 
> > wrote:
> Maybe you'd try testing all the video types you support, and
> if one is "maybe" while another is "probably" you'd go with
> "probably"?
>
> Right. Or you might have plugin-based fallback you can use if you  
> get "maybe". Other authors with no plugin-based fallback would go  
> ahead if they get "maybe".
>
> Programmers expect binary logic,
> not ternary (look at the complaints about SQL's NULL).
>
> I agree. In the past I argued for two boolean functions.
>
> Anyway, it's a little late now to change canPlayType more than we  
> just did. There is already deployed content checking for  
> "probably"/"maybe".

If I were designing the API from scratch, I would have two functions,  
"mightPlayType()" and "canDefinitelyPlayType()". That would make it  
easier to write natural boolean expressions. However, I think the  
current canPlayType() is good enough - the empty string pseudo-false  
return should make it mostly ok to treat canPlayType as a boolean  
method. Also, it's a change that we felt we could rush into Firefox  
and Safari updates without undue risk, before the even more broken  
version with the "no" return got locked in. To everyone proposing more  
wide-ranging changes , this API is probably past the point where we  
can freely change it any way we want.

Regards,
Maciej

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090711/f9bb5564/attachment.htm>
Received on Saturday, 11 July 2009 12:10:53 UTC

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