A Complete Guide to Web Design

(やまだぃちぅ) #1
344 Chapter 19 – Audio on the Web

Streaming Audio


Web Design in a Nutshell, eMatter Edition

Linking to Shockwave and QuickTime audio

Because Shockwave and QuickTime files are transferred like any other file from an
HTTP server, you can link them to the Web the same as downloadable media. The
difference is that audio will start playing more quickly because the player does not
need to wait for the entire file to download. It will begin playing once the buffer is
filled and will continue playing as the remainder of the file is being transferred.
<A HREF="song.dcr">Link to Shockwave Audio</A>
Many streaming audio files that have dedicated server solutions may also be
accessed via standard HTTP connections. This generally lowers performance.

<embed> attributes for QuickTime plug-in

src=URL
The URL for the.mov file.
controller=true|false
This provides a control strip that allows the user to start and stop the audio
and adjust its volume. The controls will appear by default.
autoplay=true|false
When set totrue, the audio file will begin playing automatically. This is
equivalent to theautostart attribute used with many other plug-in players.
loop=true|false|palindrome
To play the audio just once, setlooptofalse. If you want it to repeat infi-
nitely, set it totrue. Thepalindromesetting will play the audio file through,
then play it in reverse when it gets to the end, and then play it through again.
href=URL
This makes the control strip (or movie frame for a video) a link to another
web page.
width=value
height=value
These values define the dimensions of the control panel area (it is more
useful for videos where it also defines window size)

<embed> attributes for the RealAudio plug-in

The three primary attributes for embedding RealAudio are:
src=URL
The URL to the RealAudio file (.ra)
autostart=true|false
When set totrue, the RealAudio file will begin playing automatically.
width=value
height=value
Sets the size for the control panel.
In addition, you can use multiple<embed>statements to create a custom interface
made up of individual controls. Each<embed>tag takes acontrolsattribute with
one of the following control elements:
Free download pdf