The <BGSOUND>
element (supported only in IE)allows authors to create pages that will play sound clips, or background soundtracks while the page is being viewed Sounds can either be samples (.WAV or .AU format) or MIDI (.MID format).
The HTML used to insert a background sound into a page is:
<BGSOUND SRC="start.wav">
The BGSOUND
element accepts the following attributes.
BALANCE=Stereo balancing
The BALANCE
attribute can be used to change the stereo balance when the sound file is played. It accepts values between '-10000' and '10000'. The effect of the two extreme values depends on the sound settings on the users system, but using either of the extreme values will force the sound to play from one speaker only.
CLASS=n
The CLASS
attribute is used to specify the <DIR>
element as using a particular style sheet class.
ID=n
The ID
attribute can be used to either reference a unique style sheet identifier, or to provide a unique name for the <DIR>
element for scripting purposes. Any <DIR>
element with an ID
attribute can be directly manipulated in script by referencing its ID
attribute.
LANG=n
The LANG
attribute can be used to specify what language the <DIR>
element is using. It accepts any valid ISO standard language abbreviation (for example "en"
for English, "de"
for German etc.)
LOOP=n
This attribute specifies how many times a sound will loop when activated. If n=-1
or LOOP=INFINITE
is specified, the sound will loop indefinitely.
SRC
This attribute specifies the address of a sound to be played.
TITLE=n
The Internet Explorer 4.0 (and above) specific TITLE
attribute is used for informational purposes. The <BGSOUND>
attribute presents nothing on the screen, so no 'ToolTip' is provided by the TITLE
attribute.
VOLUME=n
The VOLUME
attribute accepts values between '-10000' and 0 and can be used to set the volume at which the sound file will play. Note that using '0' (i.e. maximum volume), will play the sound file at 100% of the users current volume settings. There is no way in HTML that you can force a sound file to play at a volume indecent to the user. They will always have total control.
NOTE : Internet Explorer now fully supports use of Netscape plug-ins using the <EMBED>
element.