17. August 2009

HTML Video Tag

They did it again. 15 years after the img-tag, they invented a video-tag. I know, that native video makes the world better. I am totally pro-video. But to call the tag "video" is just plain wrong.

In HTTP, the server tells the content type of data. The client has no say. But if you call a tag "img" (or "video") then the browser expects a certain (subset) of content types. Ever tried to return an HTML from the URL of an img-tag: broken image. Even though it was valid HTML. Why doesn't the browser show an embedded HTML fragment instead? Why does it insist on an image? The browser requests a resource by URL to fill some screen space. If the server returns HTML, the client could show the HTML. This would have eliminated the need for frame and iframe.

One embed-tag would have been enough instead of img, iframe, and video. An embed-tag would simply tell: "here comes some screen space that is to be filled with the src-URL". And nobody would care if the content type is an image or PDF or video or HTML.

On the other hand, it's not really that bad.
Not really worth a rant.
Thanks for the native video, guys.
It's cool.
Especially combined with (the much too long ignored) SVG.

:-) It's not like embedded native video hasn't been postulated 13 years ago. I asked them at RTMW 96 (last century), if they would just add a video codec to the browser and a simple request/response. But back then, people wanted to make it complicated with RTSP, multimedia frameworks and such. In the meantime we had never-really-working-MPEG-plugins, a Microsoft video player disaster, a Flash workaround, because Macromedia just could not stand it anymore. Finally, the browser guys made it as simple as requested in 1996.


Keine Kommentare: