Skip to main content

TAudio

Index

Constructors

Accessors

Methods

Constructors

constructor

Accessors

publicmuted

  • get muted(): boolean
  • set muted(value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

Methods

publicgetContext

  • getContext(): AudioContext
  • Gets the AudioContext. You must do this AFTER the user has interacted with page. Otherwise Chrome will block the context.


    Returns AudioContext

    ctx

publicloadSound

  • loadSound(url: string): Promise<string>
  • Parameters

    • url: string

    Returns Promise<string>

publicplay

  • play(uuid: string, volume: number): void
  • Parameters

    • uuid: string
    • volume: number

    Returns void