Webkit just annonced that they are working on media tag support based on the HTML5 draft. It is currently implemented on Mac build and is based on the support of Quicktime.
Another nice feature from the HTML5 draft specification is now available in the WebKit nightly builds for Mac OS X. The new HTML5
Adding a video can be as simple as:
<video src=sample.mov autoplay></video>
What’s really exciting is the video playback control can be accessed directly by javascript.
<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”>
And also the controls can be tied into regular events:
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();
This is a huge improvement and definitely going the right direction. Now the question is when will it be released and is it going to be available on other browsers?
Now it’s getting me really excited about the up coming HTML 5.
Another question is, since this built is based on the support of QuickTimes, I’m assuming IE if it will support the same tags it will be based on WindowsMedia Player, but what about Firefox?

1 Response to “Webkit Introduces: HTML5 Media Support”
Leave a Reply