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

Robert O'Callahan robert at ocallahan.org
Thu Jul 9 19:35:17 PDT 2009


2009/7/10 Ian Fette (イアンフェッティ) <ifette at google.com>

> To me, this seems like a great test if "canPlayType" actually works in
> practice. In the perfect world, it would be great to do
> getElementById('video'), createElement, and
> then canPlayType('video/whatever','theora').
> If this simple use case doesn't work, I would ask if it's even worth
> keeping canPlayType in the spec.
>

var v = document.getElementById("video");
if (v.canPlayType && v.canPlayType("video/ogg; codecs=vorbis,theora")) {
  ...
} else {
  ...
}

should work great. Certainly does in Firefox.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090710/91ff97f7/attachment-0002.htm>


More information about the whatwg mailing list