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

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

From: Ralph Giles <giles@xiph.org>
Date: Thu, 9 Jul 2009 21:40:29 -0700
Message-ID: <5d88ef650907092140g7f6c335v5b8212504306513d@mail.gmail.com>
On Thu, Jul 9, 2009 at 9:22 PM, Maciej Stachowiak<mjs at apple.com> wrote:

> I think at one point I suggested that canPlayType should return one of
> boolean false, true or "maybe", so that naiive boolean tests would work. Or
> in any case, make the "no" option something that tests as boolean false.

We seem to have wound up with a tristate where one of the states is
never used, which is unfortunate. Is it too late now?

To recap (off the top of my head): it's hard to say if you can play
something because that requires either a validator, or actually
playing it, So in addition to 'yes' and 'no', a 'maybe' was added, to
say "I've heard of the media type and codecs and profiles, so it's
worth trying; no promises."

But the whole idea of canPlayType is to be a lightweight test do
decide what to try playing in advance, so browsers are unlikely to
implement a check that involves actually loading and testing the
resource. So in practice 'yes' would only be returned in special
applications, not for general web resources. 'No' means no, 'maybe'
means yes and 'yes' never gets used.

It will be confusing either way, but if canPlayType were reverted to a
boolean, with a note that true means 'maybe', not 'yes', there would
at least be fewer programming errors.

But Ian's just replied with a clever compromise.

 -r
Received on Thursday, 9 July 2009 21:40:29 UTC

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