I'm looking for a little js guidance with this: http://www.videojs.com/docs/setup/ This code I'm currently using plays the video.js player in IOS, IE10 & Chrome, but not IE8 and FF <script _V_.options.flash.swf = "http://theurl.com/video-js/video.js.swf" </script> <script videojs.options.flash.swf = "http://theurl.com/video-js/video.js.swf" </script> <video id="_1200k.mp4" class="video-js vjs-default-skin" controls preload="none" width="640" height="264" poster="[var.base_url]/[var.thumb_file]" data-setup='{"example_option":true}'> <source src="http://theurl.com/uploads/Yr7fGNOH0ell3Ml_1200k.mp4" type='video/mp4' /> </video> Code (markup): I'd like help getting it to work in IE8 and FF. Any help will be greatly appreciated.
IE8 does not support HTML5 which the <video> tag is. You need to add a conditional like I've made in the code below. <!-- ie8 and lower --> <!--[if lt IE 9]> <object width="640" height="264" data="http://theurl.com/uploads/Yr7fGNOH0ell3Ml_1200k.mp4""></object> <![endif]--> <!-- html5 supported browser --> <!--[if gte IE 9]> <script _V_.options.flash.swf = "http://theurl.com/video-js/video.js.swf"></script> <script videojs.options.flash.swf = "http://theurl.com/video-js/video.js.swf"></script> <video id="_1200k.mp4" class="video-js vjs-default-skin" controls preload="none" width="640" height="264" poster="[var.base_url]/[var.thumb_file]" data-setup='{"example_option":true}'> <source src="http://theurl.com/uploads/Yr7fGNOH0ell3Ml_1200k.mp4" type='video/mp4' /> </video> <![endif]--> Code (markup):
Generally speaking I'm of the opinion that if you need javascript for a flash embed, you're doing something WRONG. I don't know what this 'video.js' crap is, but I'd swing a massive axe at it as pointless BS.