Audio
Implemented by
Index
Properties
loop
Whether the audio should loop (repeat forever)
playbackRate
Set the playbackRate, default is 1.0 at normal speed. For example 2.0 is double speed, and 0.5 is half speed.
volume
The volume (between 0 and 1)
Methods
getPlaybackPosition
Return the current playback time of the playing track in seconds from the start
Returns number
getTotalPlaybackDuration
Return the duration of the sound
Returns number
isPaused
Returns if the audio is paused
Returns boolean
isPlaying
Whether or not any audio is playing
Returns boolean
isStopped
Returns if the audio is stopped
Returns boolean
pause
Pause the sound
Returns void
play
Will play the sound or resume if paused
Returns Promise<any>
seek
Seek to a position (in seconds) in the audio
Parameters
position: number
Returns void
stop
Stop playing the sound and reset
Returns void
Represents an audio control implementation