Represents an audio control implementation

Hierarchy

  • Audio

Implemented by

Properties

loop: boolean

Whether the audio should loop (repeat forever)

playbackRate: number

Set the playbackRate, default is 1.0 at normal speed. For example 2.0 is double speed, and 0.5 is half speed.

volume: number

The volume (between 0 and 1)

Methods

  • Return the current playback time of the playing track in seconds from the start

    Returns number

  • Return the duration of the sound

    Returns number

  • Will play the sound or resume if paused

    Returns Promise<any>

  • Seek to a position (in seconds) in the audio

    Parameters

    • position: number

    Returns void