Firefox 3.1 nightlies, starting with 2008073003 supports the HTML5 WHATWG spec for OGG file playback in <video> and <audio> tags! No more embedding flash or QuickTime just to play some sound. Wikimedia already uses OGG Vorbis files for sounds and OGG Theora files for video, but (in my browser at least) it has to fire up a Java applet to play them.

<audio>

This can be as simple as <audio src="path_to_file.ogg"></audio>

bare audio with controls="true"

Here's a local OGG file of Albanium numbers with controls="true" and autoplay. , hmm, I don't see any controls (known issue)..

audio tag with JavaScript control

Let's be a little friendlier and not play sound automatically.

Let's try it with a Vivaldi audio sample  from Wikimedia commons (played by John Harrison).

  1. First a controller script code from http://webkit.org/blog/140/html5-media-support/
  2. Now the <audio> tag:
  3. And a button hooked up to the script

<video>

Let's try it with a weird washing video from Wikipedia.

  1. First a controller script code from http://webkit.org/blog/140/html5-media-support/
  2. Now the <video> tag:
  3. And a button hooked up to the script

Bugs

As above, autoplay="false" doesn't stop from playing when the page loads. bug 448633 filed. D'oh, damn HTML boolean attribute weirdness:autoplay="anything" turns autoplay ON
Paused="false" doesn't stop audio from playing if autoplay is on (same bug?).

Tools > Page Info doesn't show the ogg files in its Media tab, bug 448630 filed. (Here's some media to make the tab show up )