Jan 24

It was about time to see some movement on that side. As we notice all the Java Script libraries to evolve few days ago it was published new public draft of HTML 5 as well as a document describing the differences from HTML 4.
Here is an abstract:

This specification defines the 5th major revision of the core language of the World Wide Web, HTML. In this version, new features are introduced to help Web application authors, new elements are introduced based on research into prevailing authoring practices, and special attention has been given to defining clear conformance criteria for user agents in an effort to improve interoperability.

As well as the other abstract:

HTML 5 defines the fifth major revision of the core language of the World Wide Web, HTML. “HTML 5 differences from HTML 4″ describes the differences between HTML 4 and HTML 5 and provides some of the rationale for the changes. This document may not provide accurate information as the HTML 5 specification is still actively in development. When in doubt, always check the HTML 5 specification itself.

It is interesting to read all these new tags comming up as well as all these that will be left. For example all font, center, applet will be left behind as all these can be easily be written with styles.

HTML 5 Public Draft
HTML 5 Differences from HTML 4

Nov 14

Another nice feature from the HTML5 draft specification is now available in the WebKit nightly builds for Mac OS X. The new HTML5

<video src=sample.mov autoplay></video>

To make a button that gives the user basic playback controls you could do this:

<script>
function playPause() {
  var myVideo = document.getElementsByTagName('video')[0];
  if (myVideo.paused)
    myVideo.play();
  else
    myVideo.pause();
}
</script>
<input type=button onclick="playPause()" value="Play/Pause">

The specification also defines a set of events that can be used to react to changes in media playback and load state. For example:

myVideo.addEventListener('ended', function () {
  alert('video playback finished')
} );

To play audio from JavaScript you can simply do this:

var audio = new Audio("song.mp3");
audio.play();

The implementation is still a work in progress and not all features (including the ‘controls’ attribute which gives native playback controls) of the specification are there yet. The current implementation supports all formats that QuickTime supports, including installed 3rd party codecs.

The example below uses the ‘poster’ attribute of the

Opera’s implementation is similar, including informative text when the media is not available:

<video controls src="demo.ogg" id="myVideo">Theora decoder not found</video>