Skip to content

[audioworklet] Add state and related event handlers in AudioWorkletNode #1247

@hoch

Description

@hoch

Motivation: #1193 (comment)

The propose IDL is:

enum AudioWorkletProcessorState {
  "created",
  "running",
  "stopped",
  "error"
};

interface AudioWorkletNode : AudioNode {
  readonly attribute AudioParamMap parameters;
  readonly attribute MessagePort port;
  readonly attribute AudioWorkletProcessorState processorState;
  attribute EventHandler onprocessorstatechange;
  attribute EventHandler onprocessorerror;
}

In this way, user can inspect the current status of AWN more easily. More importantly, the construction of AWN/AWP is now asynchronous, thus the failure in the processor construction will notify the node via onerror event handler and render the node inactive state, resulting the silent output.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions