views:

52

answers:

3

Is it possible to have Flash video first then to fall back to html5?

Like I have something like this if(Flash is installed){ run flash player} else if(can do video tag w/ h.264){ use HTML5 video tag with h.264}

Now this is javascript so it's being written in javascript, then the inner html will get the right tags.

A: 

you can find a javascript flash detection tutorial here. Or a plugin that will meet your needs (if I read wright) here

Nealv
+1  A: 

This is just my opinion, but I think you'd be better off switching the fallback order: HTML5 video with a fallback to Flash. Flash market penetration is so high that I doubt any visitors to your site would ever experience the arguably better HTML5 video delivery. Plus, it would be much easier to implement as scripts like VideoJS have already been written to handle such fallbacks. This is just my two cents, but hopefully it's helpful.

Andrew
Arguably better?
Tegeril
Depends on personal preference, really. I'm 100% behind the video tag over Flash, though I will concede that things like true full screen (not just full-window) video and ease of switching between HD and non-HD sources is still something Flash handles better.
Andrew
A: 

Here is an example of using Flash as a fallback to HTML5 video, as Andrew describes: http://henriksjokvist.net/archive/2009/2/using-the-html5-video-tag-with-a-flash-fallback

I tend to agree with Andrew regarding switching the fallback order, but if you really want Flash first, you could always reverse the logic as described in the above linked example.

Bart