Jing
Jing

Reputation: 1965

HTML 5 video cannot play on Firefox 7

I want to embed a video in the webpage, I use the following code:

<!-- Video Section-->
<video controls="controls" width="640px">
    <source src="media/videos/video.mp4"  type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'/>
    <source src="media/videos/video.webm" type='video/webm; codecs="vp8, vorbis"'/>
    <source src="media/videos/video.ogv"  type='application/ogg; codecs="theora, vorbis"'/>
</video>

So I can play this video on Safari, Chrome, but cannot on Firefox. I think Firefox support both ogg and webm video, so I don't know what's the problem. I only saw a gray block with a cross mark inside.

p.s. I used to use type='video/ogg', it didn't work, so I change to this type='application/ogg' based on googled suggestions, but this still doesn't work.

Thanks!

Upvotes: 1

Views: 837

Answers (1)

albert
albert

Reputation: 8153

probably server settings. if you're on apache, check your mime.types file and see if or set these AddType video/ogg .ogm AddType video/ogg .ogv AddType video/ogg .ogg

Upvotes: 1

Related Questions