melonJS
    Preparing search index...

    Function state

    • Get the load state of an audio clip.

      Useful when a clip was declared with preload: false, or to tell "still loading" apart from "loaded but silent".

      Parameters

      • sound_name: string

        Audio clip name (case-sensitive).

      Returns "loaded" | "loading" | "unloaded"

      "unloaded", "loading" or "loaded".

      if (me.audio.state("theme") === "loaded") { ... }