The duration of fade in or out, in milliseconds
How long to pause between music tracks, in milliseconds
Clears the playlist and the music queue. Does not stop music that's currently playing.
Returns the name of the currently playing music file, or null if nothing is playing. If music has been asked to stop, returns the name of the music file that will play next.
Fades out sound.
The audio element that should fade out
Function that is called when the audio has stopped completely with a boolean as the first parameter that matches what this function returned
Returns false if the element doesn't exist or is not an audio element, true otherwise.
Checks if any audio is playing. Note that sound that is being loaded or has received a play command but isn't playing for some other reason isn't considered as playing, even though it's about to start.
Returns true if audio is playing, false otherwise.
Checks if any sound effect is playing.
Returns true if a sound effect is playing, false otherwise.
Checks if an audio element is playing.
DOM element, jQuery object or jQuery selector of the audio element
Returns true if audio element exists and is playing, false otherwise.
Checks if music is playing.
Returns true if music is actually playing and it isn't fading out at the moment.
Starts playing music. If the same music file is already playing, does nothing except sets the looping property. If another music file is playing, fades out the old one before playing the new one.
The URL of the audio file
An optional options object
Starts playing a sound effect.
The URL of the audio file
An optional options object
Returns the audio DOM element.
Sets a playlist and starts playing it.
An array of music file URLs
An optional options object
Stops playing music. Clears the music queue and the playlist.
The duration of the fadeout in milliseconds. Set to 0 to stop immediately.
Generated using TypeDoc
Default values for durations.