Function addAudioWorklet

  • This function adds module as AudioWorklet.

    Parameters

    • context: AudioContext

      This argument is instance of AudioContext for adding AudioWorklet module.

    • processor: (new () => AudioWorkletProcessor)

      This argument is class that extends AudioWorkletProcessor.

    • Optionaloptions: WorkletOptions

      This argument is one of 'omit', 'same-origin', 'include'. The default value is 'same-origin'.

    Returns Promise<void>

    Return value is Promise that addModule returns.