MDN self-hosted library · e01.org

AudioWorkletGlobalScope: port

Web Audio API

no runnable cells web-api-instance-property upstream source

Web Audio API

The port read-only property of the AudioWorkletGlobalScope interface returns a MessagePort object that can be used to send and receive messages between the main thread and the associated AudioWorklet.

This allows for custom, asynchronous communication between code in the main thread and the global scope of an audio worklet, such as sending control data or global settings.

Value

The MessagePort object that is connecting the AudioWorklet and its associated AudioWorkletGlobalScope.

Examples

See AudioWorkletNode.port for examples.

Specifications

Browser compatibility

See also