2009/7/10 Ian Fette (イアンフェッティ) <ife...@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]

Reply via email to