A Complete Guide to Web Design

(やまだぃちぅ) #1
Nonstreaming (Static) Audio 339

Audio

Nonstreaming (Static) Audio

Web Design in a Nutshell, eMatter Edition

The LiveAudio plug-in tag can take a number of attributes:


src=URL
Defines the URL of the audio file


controls=console|smallconsole|playbutton|pausebutton|
stopbutton|volumelever
consoleplaces a control panel with play, stop, pause, and volume controls.
smallconsoleplaces a smaller version with just play, stop, and a volume
control. The default setting isconsole. See Figure 19-1 (taken from a Macin-
tosh display).


height=number
width=number
Width and height tags are required by thetag. In the case of audio
files, the width and height measurements correspond to the size of the
console in pixels. Gray space will be added around the control if measure-
ments larger than the console’s maximum dimensions are specified.


loop=true|false|number
When set totrue, the audio file will play continuously. When set tofalse
(the default), the audio plays through just once. You can also specify a
numerical value for the number of times you want the audio to play in a row.


autostart=true|false
When this is set totrue, the audio clip starts playing as soon as it loads.
Whenfalse, the audio will begin playing when the user clicks Play in the
console.


hidden=true
This attribute, when set totrue, causes the console to be hidden from view.
Note that combined withautostart=true, this can create the same effect as


.

volume=(0-100)
This allows you to set the volume for the sound when it begins playing. It is
based on a percentage scale from 1 to 100. If it is not specified, the audio file
will be played at the default system volume.


Figure 19-1: Live Audio’s console (left) and small console (right) controls


console (144 x 60 pixels) smallconsole (144 x 15 pixels)
Free download pdf