<div class="gmail_quote">2009/7/9 Michael A. Puls II <span dir="ltr"><<a href="mailto:shadow2531@gmail.com">shadow2531@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Thu, 09 Jul 2009 19:10:08 -0400, Maciej Stachowiak <<a href="mailto:mjs@apple.com" target="_blank">mjs@apple.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Jul 9, 2009, at 3:34 PM, Peter Kasting wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, Jul 9, 2009 at 3:30 PM, Aryeh Gregor <Simetrical<br>
+<a href="mailto:w3c@gmail.com" target="_blank">w3c@gmail.com</a>> wrote:<br>
On Thu, Jul 9, 2009 at 10:04 PM, David Gerard<<a href="mailto:dgerard@gmail.com" target="_blank">dgerard@gmail.com</a>><br>
wrote:<br>
> Really? I thought that was next Chrome, not this Chrome.<br>
<br>
It works in the developer version:<br>
<br>
<a href="http://dev.chromium.org/getting-involved/dev-channel" target="_blank">http://dev.chromium.org/getting-involved/dev-channel</a><br>
<br>
For any site author needing a UA sniffing route to determine whether<br>
a visitor's Chrome version supports <video>, just look for version<br>
3.x or higher.<br>
</blockquote>
<br>
I'd recommend using feature testing or fallback instead though, if you<br>
can make that work for your site.<br>
</blockquote>
<br></div></div>
Just to add:<br>
<br>
For detecting video support via JS, I suggest feature testing for window.HTMLVideoElement (and optionally window.HTMLAudioElement and window.HTMLMediaElement).<br>
<br>
You indeed can't really go by UA string sniffing as what if I use UserJS to make HTMLVideoElement and HTMLAudioElement aliases to HTMLUnknownElement, HTMLMediaElement equal to {} and use Getters/Setters and prototypes to provide an HTMLMediaElement API proxy to a child <object> that loads the VideoLan plug-in (for example, which is scriptable and can play Theora and others)?<br>

<br>
In that case, I wouldn't want to have to also spoof the UA (via HTTP User-Agent and JS's navigator.userAgent etc.) just to get the right code on the page.<br>
<br>
I already see that <<a href="http://openvideo.dailymotion.com/" target="_blank">http://openvideo.dailymotion.com/</a>> and <<a href="http://youtube.com/html5" target="_blank">http://youtube.com/html5</a>> are using lousy UA string detection. There is some use of fallback for <video>, but for the JS code that calls stuff like video.play() etc., UA string detection is used, which makes things too brittle and makes it so any new browser that supports <video> has to wait for the UA detection to get updated.<br>

<br>
I think I saw a recent Jquery <video>/<audio> plug-in though that doesn't use any UA string detection, which is good.<br>
<br>
-- <br><font color="#888888">
Michael<br>
</font></blockquote></div><br><div>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').</div>
<div><br></div><div>If this simple use case doesn't work, I would ask if it's even worth keeping canPlayType in the spec.</div>