Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IAudio

Represents an audio control implementation

Hierarchy

  • IAudio

Implemented by

Index

Methods

isPlaying

  • isPlaying(): boolean
  • Whether or not any audio is playing

    Returns boolean

pause

  • pause(): any
  • Pause the sound

    Returns any

play

  • Will play the sound or resume if paused

    Returns Promise<any>

setLoop

  • setLoop(loop: boolean): any
  • Set whether the audio should loop (repeat forever)

    Parameters

    • loop: boolean

    Returns any

setVolume

  • setVolume(volume: number): any
  • Set the volume (between 0 and 1)

    Parameters

    • volume: number

    Returns any

stop

  • stop(): any
  • Stop playing the sound and reset

    Returns any