2
votes

I am trying to use video.js to play an mp4 file. It will not play in IE9. It plays fine in Firefox and Chrome. If I open the video in windows media player, it plays fine as well (perhaps IE9 and windows media player use the same codecs?). I have now confirmed that IE9 is not even requesting the file.

See example here: http://devonline.northcarolina.edu/lcl/ded_prod/exams/video/jstest.html

<html>

<link href="video-js/video-js.css" rel="stylesheet">
<script src="video-js/video.js"></script>
<script>
  videojs.options.flash.swf = "video-js/video-js.swf"
</script>

<body>
Video should be here:

<video id="example_video_1" class="video-js vjs-default-skin"
  controls preload="auto" width="640" height="264" >
 <source src="http://devonline.northcarolina.edu/lcl/ded_prod/exams/video/student/invite.mp4" type='video/mp4' />
</video>

</body>

</html>
3
The player on videojs.com page isn't even working in IE 9 or 10. - teamdane

3 Answers

0
votes

Two things to try.

  1. Try putting the full path to the video in the src attribute, e.g. src="http://www.mywebsite.com/path/to/the/video.mp4" as sometimes IE needs this.

  2. Failing that try re-encoding the video using something like Miro Video Converter as not all MP4 files are the same and what one browser can play another may not be able to.

0
votes

This issue also exists in IE10.

There's something going on with HTTP compression in your example. If you use Fiddler to remove the outbound Accept-Encoding request header, your server properly avoids using GZIP compression on the response. Then IE has no problem playing back your video.

Generally speaking, you should avoid having your server GZIP MP4 content before returning it; it's bad for performance and rarely saves a significant number of bytes (since mp4 content is already highly compressed).

0
votes

I figured it out. It was that the request was going through the CMS I was using. The CMS can't handle requests for partial files, so it just outputs the entire thing each time. So, in my .htaccess I made it so that my mp4 files would not be routed through the CMS anymore and it started working.