Reputation: 1290
Is it necessary to specify codecs like so in html5 video :
<video id="movie" width="320" height="240" preload controls>
<source src="pr6.webm" type="video/webm; codecs=vp8,vorbis" />
<source src="pr6.ogv" type="video/ogg; codecs=theora,vorbis" />
<source src="pr6.mp4" />
</video>
Or is it ok to simply do the following :
<video id="movie" width="320" height="240" preload controls>
<source src="pr6.webm" type="video/webm" />
<source src="pr6.ogv" type="video/ogg" />
<source src="pr6.mp4" />
</video>
The last method seems to work fine in browsers, what is the benefit of the first method? This info is taken from http://diveintohtml5.info/video.html which also should have the mp4 video first in the list for iDevices.
Upvotes: 3
Views: 2703
Reputation: 3089
No! You just have to make sure to use the supported codecs for the browsers in which your page will be rendered. The browser will ignore the ones it doesn't understand till finds the codec it understands.
Upvotes: 3