[html5] <video> tag fallback

Michael Dale dale at ucsc.edu
Tue Apr 14 10:38:55 PDT 2009


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.

--michael





Henri Sivonen wrote:
> On Apr 14, 2009, at 15:18, Steven Garrity wrote:
>
>> We're working on implementing the <video> tag to play a Ogg Theora 
>> video for a client. We're including a Flash playing in the "fallback 
>> content" for Internet Explorer.
>
> Have you considered and rejected using Java-based fallback in IE with 
> the same Ogg file that you'll be serving to Firefox?
> http://www.flumotion.net/cortado/
>
>> We're running into trouble with the lack of a common format, though. 
>> It seems the current behaviour in Safari is that if the video format 
>> is not supported (Ogg Theora, for example), then the <video> player 
>> is shown (empty) rather than the fall back content.
>>
>> Is this the intended/spec'ed behaviour when no video format playable 
>> by the client is provided?
>
> Yes, this is the specced/intended behavior.
>
>> Please note that I know we can provide a Safari-playable video format 
>> as well as a secondary source in the <video> tag. We'd like to avoid 
>> having to add another (third, if you count ogg+flash) format, 
>> especially another proprietary format.
>
> You could instruct Safari users to install XiphQT.
> http://xiph.org/quicktime/
>




More information about the Help mailing list