Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
172
rated 0 times [  174] [ 2]  / answers: 1 / hits: 46704  / 13 Years ago, wed, february 29, 2012, 12:00:00

EDIT I have changed some Javascript now, so if I can find a javascript function that detects HTML5 Video support, it should work.



I have a HTML5 video player that has flash fallback, if HTML5 isnt supported, I want it to fallback to flash. Im currently using



<!--[if !IE]><!--> then load my custom player
else use SWFObject to render it.



Is it possible to do the folllowing:



`  If (HTML5 supported browser) {
<some html and script> (My custom player)
}else{
<different html and script> (I would call SWFobject here)
}
`


Trying to find a nice easy solution idea.



Usually I would be able to have an additional <object> in the video tag, but this won't be possible due to the way the player is inserted into the page.



Even though I can detect HTML5 support with a possibly unreliable method, I'm not sure how to have my HTML based on the output of the support


More From » jquery

 Answers
30

Have you had a look at http://www.modernizr.com/docs/#features-css



It can do feature detection


[#87143] Tuesday, February 28, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
coby

Total Points: 27
Total Questions: 102
Total Answers: 97

Location: Honduras
Member since Wed, Jul 14, 2021
3 Years ago
coby questions
;