HTML5 brings or will bring <video>
and <audio>
tags, among others. Ever since I heard of them, and even more so after reading Why do we have an img
element? and particularly Jay C. Weber's message back from 1993 I wondered: Why the heck?
HTML has had a generic media-inclusion method for quite some time now. It supports fallback to other formats and text if the author so wishes which are now needlessly duplicated in two more special-purpose tags, each for a single kind of media.
To me, both <video>
and <audio>
are just <object>
s in disguise – or am I missing something really important here that both of them support and <object>
does not?
My confusion stems from the following problem: Given a snippet as this one:
<video id="movie" width="320" height="240" preload controls>
<source src="pr6.mp4" />
<source src="pr6.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="pr6.ogv" type='video/ogg; codecs="theora, vorbis"' />
<object>
... fallback to Flash object
</object>
</video>
Couldn't it have been written akin to
<object width="320" height="240" data='pr6.mp4'>
<object width="320" height="240" data='pr6.webm' type='video/webm; codecs="vp8, vorbis"'>
<object width="320" height="240" data="pr6.ogv" type='video/ogg; codecs="theora, vorbis"'>
<object>
... fallback to Flash object
</object>
</object>
</object>
</object>
preload
and controls
could be given as <param>
elements and I'm not quite sure how to handle the id
attribute right now.
Still, is there anything that prevents browser vendors from just rendering video and audio content with the right MIME type and codec themselves instead of handing them to a plugin?