release()
|
Releases audio resources.
|
play()
|
Starts audio playback.
|
pause()
|
Pauses playback.
|
stop()
|
Stops playback.
|
reset()7+
|
Resets the audio source to be played.
|
setVolume(vol: number)
|
Sets playback volume.
|
seek(timeMs: number)
|
Changes the playback position.
|
src:string
|
Defines the URI of an audio file to play.
|
state:AudioState
|
Defines a playback state.
|
currentTime:number
|
Defines the current playback position.
|
duration:number
|
Defines the playback duration.
|
loop:boolean
|
Defines whether to loop audio playback.
|
on('play', function callback)
|
Listens for the playback start event.
|
on('pause', function callback)
|
Listens for the playback pause event.
|
on('stop', function callback)
|
Listens for the playback stop event.
|
on('reset', function callback)
|
Listens for the playback reset event.
|
on('finish',function callback)
|
Listens for the playback end event.
|
on('error', function callback)
|
Listens for the playback error event.
|
on('dataload', function callback)
|
Listens for the data loading event.
|
on('volumeChange', function callback)
|
Listens for the volume change event.
|
on('timeUpdate', function callback)
|
Listens for the progress change event.
|