Html video tag

I am trying to play a video with a different browser

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

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

+4
source share
2 answers

Content type must be video/ogg not video/ogv -

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

Add these MIME types to 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 Types of Audio and Video MIME

+1
source

Try updating firefox, it may not support HTML 5

+1
source

Source: https://habr.com/ru/post/1437789/


All Articles