Abhishek gupta
Abhishek gupta

Reputation: 463

Video tag in html

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?

Upvotes: 4

Views: 1284

Answers (2)

Dipak
Dipak

Reputation: 12190

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

Upvotes: 1

Andrey Tsarev
Andrey Tsarev

Reputation: 779

Try updating the firefox maybe it dont support HTML 5

Upvotes: 1

Related Questions