tags:

views:

622

answers:

2

I have no choice but to play wav files directly in the browser (serverside encoding to mp3 isn't an option, unfortunately.)

What's the best way to do this? I'd really like to take advantage of the HTML 5 audio tag but my target audience includes many, many teens using IE6. As far as I'm aware flash isn't an option, but speedy playback really is critical.

Thanks.

+1  A: 

Your basic, garden variety, highly cross-browser compatible playback:

Background:

<embed src="bgsound.wav" hidden="true" autostart="true" loop="1">

On Click:

<a href="success.wav">Play Sound</a>

There are some more sophisticated ways to play wav sounds in a browser. For a rundown of the different methods, this web page provides a decent reference:

http://www.phon.ucl.ac.uk/home/mark/audio/play.htm

Robert Harvey
A: 

i'll go for flash, and provide a big clear button to stop the playback, because except for the provider of bgsound.wav, no one ever will spend a good time listening to this file :(