user2081482
user2081482

Reputation: 7

HTML5 video won't play in IE9

URL: http://carolpolis.com/#media

HTML

<video width="auto" height="200px" poster="images/WithCourage.jpg" controls>
<source src="media/WithCourage.mp4" type="video/mp4">
<source src="media/WithCourage.webm" type="video/webm">
<source src="media/WithCourage.ogv" type="video/ogg">
Your browser does not support the video tag.
</video>

.htaccess

AddType video/ogg .ogv
AddType video/ogg .ogg
AddType video/mp4 .mp4
AddType video/webm .webm
AddType application/x-shockwave-flash swf

Doctype

<!DOCTYPE HTML>

The video's play perfectly in Firefox and Chrome but in IE9 I only see the "poster" image and no media controls. It seems to know that they're videos but when I right click them and press "Play" nothing happens.

Thanks so much in advance for any help! Meredith

Upvotes: 0

Views: 1625

Answers (3)

DimaZ
DimaZ

Reputation: 11

After wasting on this problem a lot of time.I found the problem(with fiddler2) that returned content type is wrong. I tried to fix it with web.config but nothing helped .So I wrote specific action for video file and problem was solved

public ActionResult GetVideoFile(string id = "")
{
    string dir = Server.MapPath("/Content/MyVideoFiles");
    string path = System.IO.Path.Combine(dir, id);
    if ((System.IO.File.Exists(path))) {
        return File(path, "video/mp4");
    }
    return null;
}

Upvotes: 0

Vinit
Vinit

Reputation: 1825

Try using absolute URL like:

<video width="auto" height="200px" poster="images/WithCourage.jpg" preload controls>
<source src="http://carolpolis.com/media/WithCourage.mp4" type="video/mp4">
<source src="http://carolpolis.com/media/WithCourage.webm" type="video/webm">
<source src="http://carolpolis.com/media/WithCourage.ogv" type="video/ogg">
Your browser does not support the video tag.
</video>

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

Upvotes: 0

ZippyV
ZippyV

Reputation: 13018

The encoding of your mp4 video is not correct.

Based on the answer of this question I converted one of the videos on your site to use a baseline (3) encoding profile and that made the video work on an html page in IE10.

Upvotes: 2

Related Questions