MP4 to HTML5 video tag not playing in Internet Explorer

Can someone tell me why this works for Firefox and Chrome but not IE9, 10, or 11? This gives me a typical black screen with a small white square containing a red X.

<!DOCTYPE html>
<html>
<head>
    <title>HTML5 Video Player Test</title>
</head>
<body>
    <video style="position:fixed; top:0px; left:0px; height:100%; width:100%;" autoplay controls>
      <source src="./videos/video.mp4" type="video/mp4">
      <source src="./videos/video.ogg" type="video/ogg">
    </video>
</body>
</html>

      

Things I've already tried: - Adding MIME type to .htaccess - Re-encoding so the MP4 is properly H264. - video.js didn't help anything.

I also tried just using File> Open and opening the MP4 locally on my machine with IE and it plays fine, so I believe the video should be encoded correctly and that's it for IE.

+3


source to share


1 answer


For IE9 use a meta tag like



<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>

      

-1


source







All Articles