Class AudioWorkletNode
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
Although the interface is available outside secure contexts, the AudioWorklet property is not, thus custom AudioWorkletProcessors cannot be defined outside them.
[Value("AudioWorkletNode")]
public class AudioWorkletNode : AudioNode
- Inheritance
-
AudioWorkletNode
- Inherited Members
Remarks
The AudioWorkletNode interface of the Web Audio API represents a base class for a user-defined AudioNode, which can be connected to an audio routing graph along with other nodes. It has an associated AudioWorkletProcessor, which does the actual audio processing in a Web Audio rendering thread.
Constructors
AudioWorkletNode()
public AudioWorkletNode()
AudioWorkletNode(BaseAudioContext, string, AudioWorkletNodeOptions)
The AudioWorkletNode()
constructor creates a new AudioWorkletNode object, which represents an
AudioNode that uses a JavaScript function to perform custom audio
processing.
public AudioWorkletNode(BaseAudioContext context, string name, AudioWorkletNodeOptions options = null)
Parameters
contextBaseAudioContextnamestringoptionsAudioWorkletNodeOptions
Remarks
Properties
Onprocessorerror
[Value("onprocessorerror")]
public EventHandlerNonNull Onprocessorerror { get; set; }
Property Value
Parameters
The read-only parameters property of the
AudioWorkletNode interface returns the associated
AudioParamMap — that is, a Map-like collection of
AudioParam objects. They are instantiated during creation of the
underlying AudioWorkletProcessor according to its
AudioWorkletProcessor.ParameterDescriptors static
getter.
[Value("parameters")]
public AudioParamMap Parameters { get; }
Property Value
- AudioParamMap
The AudioParamMap object containing AudioParam instances.
They can be automated in the same way as with defaultAudioNodes, and their
calculated values can be used in the AudioWorkletProcessor.Process method of your AudioWorkletProcessor.
Remarks
Port
The read-only port property of the
AudioWorkletNode interface returns the associated
MessagePort. It can be used to communicate between the node and its
associated AudioWorkletProcessor.
[Value("port")]
public MessagePort Port { get; }
Property Value
- MessagePort
The MessagePort object that is connecting the
AudioWorkletNodeand its associatedAudioWorkletProcessor.
Remarks
NOTE
The port at the other end of the channel is
available under the Port property of the
processor.