Thursday, November 20th, 2008
Mark Pilgrim is back telling us what is new in the world of HTML 5 and focuses on changes with the video tag and API:
The big news this week is a major revamping of how browsers should process multimedia in the
r2404 makes a number of important changes. First, the
canPlayType()method has moved from the
HTMLMediaElement(i.e. a specific
<video>element), and it now returns a string rather than an integer. [
The canPlayType(type) method must return the string “no” if type is a type that the user agent knows it cannot render; it must return “probably” if the user agent is confident that the type represents a media resource that it can render if used in with this audio or video element; and it must return “maybe” otherwise. Implementors are encouraged to return “maybe” unless the type can be confidently established as being supported or not. Generally, a user agent should never return “probably” if the type doesn’t have a codecs parameter.
codecsparameter? That’s the second major change: the
<source type>attribute (which previously could only contain a MIME type like “video/mp4″, which is insufficient to determine playability) can now contain a MIME type and a
codecsparameter. As specified in RFC 4281, the
codecsparameter specifies the specific codecs used by the individual streams within the audio/video container. The section on the
typeattribute contains several examples of using the
Video and the Open Web is a huge issue. The idea of having video be a native object that other components can integrate with (e.g. rotate in canvas) is great. We need codecs implemented. We need penetration. We need more.
Posted by Dion Almaer at 6:58 am