Section 31
THE ADDITIONAL INFORMATION I FOUND ABOUT NETSCAPE'S <EMBED...>
HOW TO USE: LIVEAUDIO SYNTAX WITH EMBED DESCRIPTION
LiveAudio plays audio files in WAV, AIFF, AU, and MIDI formats. Audio
controls appear according to the size specified in the WIDTH  and HEIGHT
parameters in the EMBED tag. You can create an audio console with any of
the following six views.
These views may be used many times on one Web page, with all the view
instances controlling one sound file, or many sound files, depending on
how the file is called in the HTML or JavaScript.
It is also important to remember that these controls can be called by
other applets to do things like control the systems' universal volume.
HTML SYNTAX
<EMBED SRC= [URL] AUTOSTART=[TRUE|FALSE] LOOP=[TRUE|FALSE|INTEGER]
 STARTTIME=[MINUTES:SECONDS] ENDTIME=[MINUTES|SECONDS] VOLUME=[0-100]
 WIDTH=[# PIXELS] HEIGHT=[# PIXELS] ALIGN=[TOP|BOTTOM|CENTER|BASELINE|
 LEFT|RIGHT|TEXTTOP|MIDDLE|ABSMIDDLE|ABSBOTTOM] CONTROLS=[CONSOLE|
 SMALL CONSOLE|PLAYBUTTON|PAUSEBUTTON|STOPBUTTON|VOLUMELEVER] HIDDEN=[TRUE]
 MASTERSOUND NAME=[UNIQUE NAME TO GROUP CONTROLS TOGETHER SO THAT THEY
 CONTROL ONE SOUND]...>
If you want one VOLUMELEVER to control multiple NAMEs (or the system
volume), create an EMBED using the VOLUMELEVER CONTROL. Then set NAME to
MASTERVOLUME.
JAVASCRIPT FUNCTIONS
LiveAudio includes the ability to defer loading a sound file until the Play
button is pushed. This enables a Web page designer to comfortably embed
several sounds on one page, without worrying about page load time.
To implement this feature, the Web designer must create a file like the
following:
<SCRIPT LANGUAGE=SoundScript>
OnPlay(http://YourURL/YourSound.aif);
</SCRIPT>
This file should be saved and named as a sound file (such as script1.aif).
When the Play button is pushed, the URL you defined for the OnPlay function
is loaded.
EXAMPLES OF LIVEAUDIO USES
To play a sound as a background sound for a Web page:
<EMBED SRC="mysound.aif" HIDDEN=TRUE>
To have several CONTROLS controlling one sound file:
<EMBED SRC="mysound.aif" HEIGHT=22 WIDTH=37 CONTROLS=PLAYBUTTON
  NAME="MyConsole" MASTERSOUND>
<EMBED SRC="stub1.aif" HEIGHT=22 WIDTH=37 CONTROLS=PAUSEBUTTON
  NAME="MyConsole">
<EMBED SRC="stub2.aif" HEIGHT=22 WIDTH=37 CONTROLS=STOPBUTTON
  NAME="MyConsole">
<EMBED SRC="stub3.aif" HEIGHT=20 WIDTH=74 CONTROLS=VOLUMELEVER
  NAME="MyConsole">
To use a SMALLCONSOLE:
<EMBED SRC="mysound.aif" HEIGHT=15 WIDTH=144 MASTERSOUND
  CONTROLS=SMALLCONSOLE>
LIVECONNECT
LiveAudio is LiveConnect enabled. The following functions will work in
JavaScript to control a loaded LiveAudio plug-in:
Controlling functions (all Boolean):
play('TRUE/FALSE or int','URL of sound')
stop()
pause()
start_time(int seconds)
end_time(int seconds)
setvol(int percent)
fade_to(int to_percent)
fade_from_to(int from_percent,int to_percent)
start_at_beginning() = Override a start_time()
stop_at_end() = Override an end_time()
State indicators (all Boolean, except *, which is an int):
IsReady() = Returns TRUE if the plug-in instance has completed loading
IsPlaying() = Returns TRUE if the sound is currently playing
IsPaused() = Returns TRUE if the sound is currently paused
GetVolume() = Returns the current volume as a percentage*
[Previous Section] [Table of Contents] [Addendum] [Milt's Micro Digest Home Page]
The names Microsoft, Internet Explorer, Netscape, and others used in this document
are Trademarks, or Registered Trademarks of the companies represented.
E-mail questions, comments, or suggestions to: miltst@hotmail.com

Counter
(This page was last modified on: Monday, February 08, 1999)
1