Flash and HTML5 the Fallback?
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 java开发者_开发知识库script, then the inner html will get the right tags.
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.
you can find a javascript flash detection tutorial here. Or a plugin that will meet your needs (if I read wright) here
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.
精彩评论