Package: | Fabs.boombox |
Defined In: | Track.js |
Class: | Track |
Extends: | Object |
Config Options | Defined By | |
---|---|---|
album : String The name of the album the current track is on. | Track | |
artist : String The name of the artist of the song | Track | |
autoLoad : Boolean Immediately load this track during construction. If false, will wait
until the object is played | Track | |
songname : String The name of the song. | Track | |
title : String The title to display | Track | |
track : Number The number of the track on the album. | Track | |
url : String The url of the mp3 to play | Track | |
volume : Number Volume level the track should play at (a number between 0 and 100) | Track | |
year : Number The year the of the track | Track |
Property | Defined By | |
---|---|---|
position : Number Read-only. Current position of the track. | Track |
Method | Defined By | |
---|---|---|
Track( Object config )
Parameters:
| Track | |
hasSongInfo( Array fields )
:
BooleanReturns whether the track has information yet Returns whether the track has information yet Parameters:
| Track | |
isPlaying()
:
Boolean Returns whether the track is playing or not Returns whether the track is playing or not Parameters:
| Track | |
onReady( Function callback , [Object scope ] )
:
voidThis function allows you to call methods on the underlying soundObject when
it is loaded and ready This function allows you to call methods on the underlying soundObject when
it is loaded and ready Parameters:
| Track | |
pause()
:
Track Pause the track Pause the track Parameters:
| Track | |
play()
:
Track Start playing the track Start playing the track Parameters:
| Track | |
setVolume( Number level )
:
TrackSet the volume for this track. Set the volume for this track. Parameters:
| Track | |
stop()
:
Track Stop the track. This resets the position to the beginning. Stop the track. This resets the position to the beginning. Parameters:
| Track | |
unload()
:
void Unload the current tracks underlying soundObject Unload the current tracks underlying soundObject Parameters:
| Track |
Event | Defined By | |
---|---|---|
beforefinish :
( Track this )
Fires when the the underlying soundObject is about to finish Fires when the the underlying soundObject is about to finish Listeners will be called with the following arguments:
| Track | |
beforefinishcomplete :
( Track this )
Fires when the the underlying soundObject is just about to complete finish (??) Fires when the the underlying soundObject is just about to complete finish (??) Listeners will be called with the following arguments:
| Track | |
finish :
( Track this )
Fires when the the underlying soundObject finishes Fires when the the underlying soundObject finishes Listeners will be called with the following arguments:
| Track | |
id3 :
( Track this )
Fires when the the underlying soundObject's id3 information is loaded Fires when the the underlying soundObject's id3 information is loaded Listeners will be called with the following arguments:
| Track | |
infochange :
( Track this )
Fires when the track information is changed Fires when the track information is changed Listeners will be called with the following arguments:
| Track | |
infochange :
( Track this )
Fires when the track playing state is changed Fires when the track playing state is changed Listeners will be called with the following arguments:
| Track | |
justbeforefinish :
( Track this )
Fires when the the underlying soundObject is just about to finish (?) Fires when the the underlying soundObject is just about to finish (?) Listeners will be called with the following arguments:
| Track | |
loaderror :
( Track this )
Fires when the track does not load correctly Fires when the track does not load correctly Listeners will be called with the following arguments:
| Track | |
pause :
( Track this )
Fires when the the underlying soundObject is paused Fires when the the underlying soundObject is paused Listeners will be called with the following arguments:
| Track | |
play :
( Track this )
Fires when the the underlying soundObject starts to play Fires when the the underlying soundObject starts to play Listeners will be called with the following arguments:
| Track | |
resume :
( Track this )
Fires when the the underlying soundObject resumes play Fires when the the underlying soundObject resumes play Listeners will be called with the following arguments:
| Track | |
stop :
( Track this )
Fires when the track is stopped Fires when the track is stopped Listeners will be called with the following arguments:
| Track | |
whileplaying :
( Track this )
Fires continuosly while the track is playing Fires continuosly while the track is playing Listeners will be called with the following arguments:
| Track |