[html5] <video> tag fallback

Eric Carlson eric.carlson at apple.com
Tue Apr 14 10:45:38 PDT 2009

On Apr 14, 2009, at 10:38 AM, Michael Dale wrote:

> Unfortunately its difficult to check for xiphQT using javascript  
> right now:
> In the mv_embed library we use it with flash & ogg content and we  
> try to map out the codec player space for given source types in  
> rewriting the video tag to something the client can hopefully  
> playback:   ie a h264 mp4 stream works with vlc, quicktime, and  
> flash while ogg works with native firefox, vlc and quicktime with  
> the xiphQT component....
> Safari was supposed to support some method for getting at that  
> information with the html5 video tag we have this in our detect  
> script:
> if( this.safari ){
>   var dummyvid = document.createElement("video");
>   if (dummyvid.canPlayType("video/ogg;codecs=\"theora,vorbis\"") ==  
> "probably")
>      //video element is supported
> but it has not consistently worked very well yet ... as I understand  
> apple is adding something like that into safari sometime soon? ...  
> otherwise you can fall back on the quicktime javascript system to do  
> some work around detection.
   Nightly builds of WebKit implement the canPlayType method.


More information about the Help mailing list