AudioWorkletNodeOptions

The AudioWorkletNodeOptions dictionary of the Web Audio API is used to specify configuration options when constructing a new AudioWorkletNode object for custom audio processing. It is only used when calling the AudioWorkletNode() constructor. During internal instantiation of the underlying AudioWorkletProcessor, the the structured clone algorithm is applied to the options object and the result is passed into AudioWorkletProcessor's constructor.

Properties

numberOfInputs Optional
The value to initialize the numberOfInputs property to. Defaults to 1.
numberOfOutputs Optional
The value to initialize the numberOfOutputs property to. Defaults to 1.
outputChannelCount Optional
An array defining the number of channels for each output. For example, outputChannelCount: [n, m] specifies the number of channels in the first output to be n and the second output to be m. The array length must match numberOfOutputs.
parameterData Optional
An object containing the initial values of custom AudioParam objects on this node (in its parameters property), with key being the name of a custom parameter and value being its initial value.
processorOptions Optional
Any additional data that can be used for custom initialization of the underlying AudioWorkletProcessor.

Examples

// FILL IN EXAMPLE SNIPPET

Specifications

Specification Status Comment
Web Audio API
The definition of 'AudioWorkletNodeOptions' in that specification.
Working Draft Initial definition.

Browser compatibility

No compatibility data found. Please contribute data for "api.AudioWorkletNodeOptions" (depth: 1) to the MDN compatibility data repository.

Document Tags and Contributors

Contributors to this page: chrisdavidmills, 1valdis
Last updated by: chrisdavidmills,