Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Sound

Index

Constructors

constructor

  • new Sound(src: string | Array<string>, audioCount?: number, volume?: number): Sound
  • Simple sound object.

    Parameters

    • src: string | Array<string>
    • Default value audioCount: number = 60
    • Default value volume: number = 0.1

    Returns Sound

Properties

Private _audioCount

_audioCount: number

Private _canBePlayed

_canBePlayed: boolean = true

Private _canBePlayedInterval

_canBePlayedInterval: number | null = null

Private _delay

_delay: number = 100

Private _loopInterval

_loopInterval: number = -1

Private _playableAudioIndex

_playableAudioIndex: number = 0

Private _volume

_volume: number = 0.1

Private audios

audios: HTMLAudioElement[]

playing

playing: boolean = false

Accessors

delay

  • get delay(): number
  • set delay(value: number): void

volume

  • get volume(): number
  • set volume(v: number): void

Methods

play

  • play(): void

playLoop

  • playLoop(): void

playLoopRandom

  • playLoopRandom(): void

stop

  • stop(): void

Generated using TypeDoc