Sound and the web

There are a number of different types of sound that are commonly used on the web. Most common are AIFF, WAV, AU, MIDI, MOV, and MPEG.

A web browser uses the last part of the file name to know the file type, then looks at its preferences to find out how to deal with the sound.

Playing Sound

Downloading a Sound with a Link

The user clicks on a link (here try this!!) and the sound is downloaded. This is certainly the simplest method and uses an A HREF tag. The kind of audio determines how it will be handled by Netscape. I will describe three types: AIFF (Audio Interchange File Format), QuickTime Movie and Real Audio.

Using the META tag to Play Sound when a Page Loads

One way of getting a sound to load when the page does is to use the META tag to do client pull. The format of the client pull is:

<META HTTP-EQUIV="Refresh" CONTENT="?; URL=URL"> 

Use 0 for the question mark (?) - the time to wait and use the name of the sound you want as the URL. See Moisture, Wind, Temperature and Light for an example.

Downloading a Sound with an Embeded Controller

The sound is often loaded as the page loads (like a graphic) and the user clicks on a button or controller to play the sound. This method requires the EMBED tag. Again the type of file determines which plug-in will handle the sound. Here things get a bit complicated as different plug-ins can handle the same kind of sound yet there is no easy way of knowing which plug-in will be used. The problem really is knowing what commands to use in the EMBED tag. This section is plug-in specific and looks at 2 plug-ins that come with Netscape (LiveAudio and QuickTime) and the Real Audio plug-in.

Playing a Sound Automatically

A variation on using an embeded controller. Here the sound is loaded and played without the user having any control. Here the controller is HIDDEN. Turning on the LOOP parameter allows you to include music loops.


Valid for Fall/Winter 2003-2004

The material contained in this site is copyright and owned exclusively by Don Sinclair and members of the FACS teaching team.

Last modified on 14-Nov-03 at 9:28 AM.

york logo

I am in the process of overhauling this section. Many pages are outdated. - don
Introduction
Fundamentals
Compression
MIDI
Recording
Editing
On the web
Resources