spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column20


Navigator's LiveAudio Plug-in

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

Navigator uses the LiveAudio plug-in to play sound tracks embedded in Web pages. You can use the JavaScript's object associated with the EMBED HTML element. On the Mac, calling JavaScript methods does not affect the buttons of the Navigator's control panel. Here are the methods supported by the EMBED object:

MethodDescription
play({loop[true|false|n]}, URL)Plays the soundtrack saved in the specified URL. The first parameter specifies whether to loop the sound track forever (true), for a specified number of times (n), or not at all (false). Parameters are optional. The default for the first one is false. The default for the second one is the current object's sound track. The first parameter is mandatory on Mac (no default is supported).
pause()Pauses the sound track at the current position along the track. You can continue playing from the same spot by calling the play() method.
stop()Stops playing the sound and returns the track position to its beginning. You can start playing the sound again by calling the play() method.
StopAll()Stops all playing plug-ins.
start_time(n)Starts playing the audio track from a position that is n seconds from the beginning of the track.
end_time(n)Stops playing the audio track at a position that is n seconds from the beginning of the track.
setvol(n)Sets the volume at n percents of the maximum level (no % sign).
fade_to(n)Fades to a volume level that is n percents of the maximum level (no % sign).
fade_from_to(n, m)Fades from a volume level of n percents to a volume level of m percents (no % sign).
start_at_beginning()Starts playing at the beginning of the sound track. You can achieve this effect also by stopping the sound track and playing it again. This method overwrites the start_time() method.
stop_at_end()Stops playing at the end of the sound track. This method overwrites the end_time() method.

The following methods are state indicators which do not control the plug-in but rather give its state:

MethodDescription
IsReady()Returns true if the plug-in instance has completed loading, false otherwise.
IsPlaying()Returns true if the plug-in is currently playing the sound track, false otherwise.
IsPaused()Returns true if the plug-in is currently paused, false otherwise.
GetVolume()Returns the volume level in percents.

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


Created: May 31, 1998
Revised: May 31, 1998

URL: http://www.webreference.com/js/column20/liveaudio.html