Readonly
contextReadonly
numberReadonly
numberReadonly
parametersReadonly
portChecks if playback has started.
A boolean indicating if playback has started.
Get the current frame position since the start of playback. The position is in frames and increases by 1 for each frame. It represents the total number of frames processed by the AudioWorkletProcessor.
The current frame position as a bigint.
Get the total number of frames written to the buffer. This reflects the total frames written by the BufferWriteStrategy. Note: The method of writing to the buffer is implemented by the BufferWriteStrategy. The OutputStreamNode itself does not modify this value.
The total number of frames written as a bigint.
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
Optional
options: boolean | AddEventListenerOptionsDispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
Removes the event listener in target's event listener list with the same type, callback, and options.
Removes the event listener in target's event listener list with the same type, callback, and options.
Optional
options: boolean | EventListenerOptionsStart playback. The node must be connected before starting playback using connect() method. Output samples must be written to the buffer before starting. Playback can only be started once. Once stopped, it cannot be restarted.
A boolean indicating whether the playback started successfully.
Stop the node processing at a given frame position. Returns a Promise that resolves when the node has completely stopped. The node is disconnected once stopping is complete.
The frame position at which to stop the processing, in frames. If framePosition is 0 or if the current playback frame position has already passed the specified value, the node will stop immediately.
A promise that resolves when the node has stopped.
Static
createInternal
Creates an instance of OutputStreamNode.
The audio context to use.
The context for the audio frame buffer.
The strategy for writing to the buffer.
A promise that resolves to an instance of OutputStreamNode.
OutputStreamNode class This class extends AudioWorkletNode to handle audio processing. It manages a buffer using a FrameBufferWriter instance and tracks the current frame position.