LiveConnected Navigator Plug-Ins
Contents:
LiveAudio
LiveVideo
Live3D
Netscape Navigator 3.0 ships (on some platforms, at least) with three built-in plug-ins that have support for LiveConnect. These plug-ins are LiveAudio, LiveVideo, and Live3D. Recall from LiveConnect: JavaScript and Java that you can interact with plug-ins from JavaScript in the same way that you interact with Java applets. The sections below briefly describe the LiveConnect API provided by each of these plug-ins.
Note that this appendix does not provide full documentation for these plug-ins. In particular, it does not explain how to use the <EMBED> tag to embed data for these plug-ins into an HTML document. Some of these plug-ins define quite a few attributes for use with <EMBED> and have fairly complex HTML syntax. You can find details at:
http://home.netscape.com/comprod/products/navigator/version_3.0/development/Once you understand how these various plug-ins work, this appendix should serve as a convenient reference to their LiveConnect APIs. It won't teach you about the plug-ins themselves, however.
LiveAudio
The LiveAudio plug-in plays audio files in most common formats, including AIFF, AU, MIDI, and WAV. It is bundled with Navigator 3.0 on Windows and Macintosh platforms. Its LiveConnect API consists of the following 14 methods:
end_time(seconds)- Specify the time at which the audio clip should stop playing. Calling this method overrides the
STARTTIMEattribute. fade_from_to(from,to)- Fade the sound from the volume
fromto the volumeto. Both volumes should be volume percentages expressed as integers between 0 and 100. fade_to(volume)- Fade the sound to the specified
volume. This argument specifies volume as a percentage of maximum volume and should be expressed as an integer between 0 and 100. GetVolume()- Returns the current volume of the sound, as an integer between 0 and 100. This number represents a percentage of maximum volume.
IsPaused()- Returns
trueif the sound is paused;falseotherwise. IsPlaying()- Returns
trueif the sound is playing;falseotherwise. IsReady()- Returns
trueif the sound has completed loading and the plug-in is ready to play it. pause()- Pause sound playing, without restarting at the beginning.
play(loop,url)- Play the sound specified by
url. Ifloopistrue, then the sound should be played over and over again continuously. Ifloopisfalse, then it should be played only once. Otherwise, ifloopis an integer, it specifies the number of times that the sound should be played. Thisloopargument corresponds closely to the HTMLLOOPattribute. setvol(volume)- Sets the volume of the sound to
volume. This argument represents the volume as a percentage of the maximum volume and should be expressed as an integer between 0 and 100. start_at_beginning()- This method overrides the
start_time()method or theSTARTTIMEHTML attribute and forces the sound to be played from the beginning. stop()- Stop playing the sound.
StopAll()- Stop playing the sound and all other sounds controlled by the LiveAudio plug-in.
stop_at_end()- Calling this method overrides the
end_time()method and theENDTIMEHTML attribute and forces the sound to be played all the way to the end.