Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embeding a Video in HTML4 vs HTML5

While searching for difference between HTML4 and HTML5 I came across the point that :

HTML5 brings a whole new dimension to web world. It can embed video on web-pages without using any special software like Flash

So if we will consider a sample code in HTML4 then for embeding video then that will be:

<embed src="MyVideo.mp4"/>

While the above code can be written in HTML5 will be:

<video src="MyVideo.mp4"></video>

So what can I see is just the syntax difference. Apart from that what else is the difference.

Does this mean if we will use HTML5 to embed a video then the browser is not going to use any third parties software to play the video?

like image 517
Simsons Avatar asked Apr 27 '11 07:04

Simsons


2 Answers

The idea regarding the tag is that the browsers should have native support for it, without the use of any additional software. The standard is not yet ready, and one of the points not agreed upon is regarding what codecs to support. For more information you could have a look at the html5 video wiki page which includes a list of which browsers support what formats.

If you are planning on implementing the html5 video tag, you should provide backwards compatibility. One way is to use the VideoJS library, which will fall back to flash, if the browser doesn't support the video source.

like image 88
Jon Skarpeteig Avatar answered Sep 23 '22 15:09

Jon Skarpeteig


The current HTML5 draft specification does not specify which video formats browsers should support in the video tag. User agents are free to support any video formats they feel are appropriate. In cases where decoders are not built into the browser, the format support will be dictated by the multimedia framework of the operating system.

like image 35
CloudyMarble Avatar answered Sep 25 '22 15:09

CloudyMarble