API Docs for:
Show:

CordovaAudioTrack Class

Cordova Media audio track

Constructor

CordovaAudioTrack

()

Methods

destroy

()

Releases audio resources

pause

()

Pauses current track

play

()

Plays current track

seekTo

(
  • time
)

Seeks to a new position within the track

Parameters:

  • time Number

    the new position (milliseconds) to seek to

stop

()

Stops current track and releases audio

Properties

canPlay

Boolean

Gets a boolean value indicating whether the current source can be played

completed

Number

Gets current track progress as a percentage

duration

Number

Gets the track duration, or -1 if it cannot be determined

error

MediaError

Gets any errors logged by HTML5 audio

hadLoaded

Boolean

Gets a boolean value indicating whether the track has finished loading

id

Number

Gets the track id

id

Unknown

Sets the track id

isLoading

Boolean

Gets a boolean value indicating whether the track is in loading state

progress

Number

Gets current track time (progress)