melonJS
    Preparing search index...

    Function setStopOnAudioError

    • Set the stopOnAudioError flag — whether an audio clip that still fails after its retries throws (aborting loading) or just disables sound with a console warning. This setter is the supported way to change the flag: assigning me.audio.stopOnAudioError = false directly throws a TypeError, because module namespace properties are read-only.

      Parameters

      • value: boolean

        true to throw on a failed load, false to disable sound instead

      Returns void

      // don't abort the whole game when audio fails to load
      me.audio.setStopOnAudioError(false);