Internal class representing a Web Audio AudioBufferSourceNode instance

See

https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API

Hierarchy

  • WebAudioInstance

Implements

Constructors

Accessors

  • get duration(): number
  • Returns the set duration to play, otherwise returns the total duration if unset

    Returns number

  • set duration(duration: number): void
  • Set the duration that this audio should play.

    Note: if you seek to a specific point the duration will start from that point, for example

    If you have a 10 second clip, seek to 5 seconds, then set the duration to 2, it will play the clip from 5-7 seconds.

    Parameters

    • duration: number

    Returns void

Methods

  • Will play the sound or resume if paused

    Parameters

    • playStarted: (() => any) = ...
        • (): any
        • Returns any

    Returns Promise<boolean>