Files for Testing Browser Support of Audio Formats and Methods of Embedding

Formats for Compressed Audio

NOTE:Should not be taken as straight comparison of compression results, both because the master file is the .mov file--i.e. already compressed--and because the formats meant for streaming can and were set for different bandwidths (streaming rates). Also of course because the master file is a voice file with very limited high frequency (lowish sampling rate), dynamic range, and spatial imaging (being mono and clipped in the high range).

Support for Methods of Embedding

Simplest:

<a href="sound.wav"> This may pop up a separate window depending on plugins installed. Test:

Simple self.location

This bit of Javascript is about as simple as href=sound.wav, but it does give more flexibility in the triggering event, so you can make mouseOvers with it without any Java downloaded or plugged in. It tends to open a new window whenever it tries a sound file with a non-native format. This test file uses the Java applet AudioPlayer for the American vowels, as above, but simple self.location for the British vowels, for purposes of comparison. It is not too bad in WinXP if you choose "play in browser".

Note: to trigger a sound on loading, use   onLoad="self.location='file.wav'"
in the BODY tag. Unfortunately and unlike embed onLoad, the clip cannot be killed, short of taking down the browser. Test

Using the Java 2 (=1.2 and more) sound support: audioplayer.class

Instead of relying on proprietary plugins and helper applications, which vary a great deal across browsers and may not be there on the user's machine, we can use the Java 2 plugin, which supports a wide range of audio formats including wav, aiff, mid, and au, (but not the proprietary Real and Windows Media formats). The Java engine is usually controlled by an applet and sometimes the applet is controlled by some Javascript. The most common applet—AudioPlayer— is really whole family of partially customized versions. This applet can be actuated by any system event (hence mouseOvers or onLoad). It is somewhat slow to load and play and sometimes the page needs to be reloaded. Here are two test installations:

Proprietary controls and plugins

Here is the new, xhtml way to include the RealPlayer applet:

What, no player?
Nelson Mandela, 1964 (Note: Real plugin support gives you several possible controllers, ranging from simple "PlayButton" to "ControlPanel"(or even "ControlPanel,StatusBar")--see Source.

Comparable things can be done for Apple Quicktime, Flash, and Windows Media Player: these may have workable plugins for other platforms (e.g., Linux). WARNING: IE7 blocks Windows own ActiveX controllers by default as a security measure. Does the RealPlayer included here work in your IE7? Proprietary formats and players are not, in any case, the path we should follow.


More Java


An alternative to AudioPlayer is the newer SoundApplet.class which uses more recent versions of Java (1.3 and later) and provides its own controller. Out of the box from Sun, it requires two other classes and a playlist compiled into SoundApplet.java (not a big deal, but still ...).

This can be packaged up into a jar file. Here is an example with three files in the list:

This applet is the basis of two very important applets that play mp3 and ogg formats. One is TinyPlayer: START | STOP "Oompaloompa Song" (Note: TinyPlayer can also be scripted, as here with the start/stop buttons. It is truly superior as a simple on/off mp3 player (only). See http://www.javazoom.net/applets/tinyplayer/tinyplayer.html.

Flash for .mp3

Flash supports .mp3 format, though only at certain sampling rates (basically multiples of 22050 Hz); other sampling rates (e.g. 48000 Hz) will give you "chipmunks." If your clips are conform to that standard, you can use one of these "xpsf" players, which seem to be faster and better behaved than the Java one:. They can be set for autostart and the slim line one can play a playlist. These settings are in the long URL called by data= and concatenated with &amp;'s.

Midi Sound Support Test