4

I am trying to play video with different browser

<video Controls>
      <source src="Videos/2.ogv" type="video/ogv">
      <source src="Videos/2.mp4" type="video/mp4">
      </video>

but the google chrome plays the video but firefox doesn't play it. it shows an error that perticuler MIME type is missing after registering in IIS for ogv extension it still shows an error. is there any format that all browser support?

Abhishek gupta
  • 463
  • 3
  • 12
  • 33

2 Answers2

1

Try updating the firefox maybe it dont support HTML 5

Andrey Tsarev
  • 769
  • 1
  • 8
  • 25
1

The content-type should be video/ogg not video/ogv-

<source src="Videos/2.ogv" type="video/ogg">

Add these MIME types in your .htaccess file

Audio

AddType audio/aac .aac
AddType audio/mp4 .mp4 .m4a
AddType audio/mpeg .mp1 .mp2 .mp3 .mpg .mpeg
AddType audio/ogg .oga .ogg
AddType audio/wav .wav
AddType audio/webm .webm

Video

AddType video/mp4 .mp4 .m4v
AddType video/ogg .ogv
AddType video/webm .webm

HTML5 Audio & Video MIME Types

Dipak
  • 11,930
  • 1
  • 30
  • 31
  • sir it still don't work. i have made such changes – Abhishek gupta Oct 04 '12 at 12:30
  • @Abhishekgupta You need to contact your webhost and get them to add .ogv - video/ogg as a valid MIME type (they should know what you mean) Same for MP4. – Dipak Oct 04 '12 at 12:41
  • @Abhishekgupta check this http://stackoverflow.com/questions/2964193/html5-video-problem – Dipak Oct 04 '12 at 12:57
  • sir i have converted the file into .webm if i play the individual file. it plays into a firefox. but if i am integrating into my project it doesnt...

    the code is as follows

    – Abhishek gupta Oct 05 '12 at 06:59