MediaStreamTrackAudioSourceNode

The MediaStreamTrackAudioSourceNode interface is a type of AudioNode which represents a source of audio data taken from a specific MediaStreamTrack obtained through the WebRTC or Media Capture and Streams APIs.

The audio itself might be input from a microphone or other audio sampling device, or might be received through a RTCPeerConnection, among other possible options.

A MediaStreamTrackAudioSourceNode has no inputs and exactly one output, and is created using the AudioContext.createMediaStreamTrackSource() method. This interface is similar to MediaStreamAudioSourceNode, except it lets you specifically state the track to use, rather than assuming the first audio track on a stream.

EventTarget AudioNode MediaStreamTrackAudioSourceNode
Number of inputs 0
Number of outputs 1
Channel count defined by the first audio MediaStreamTrack passed to the AudioContext.createMediaStreamTrackSource() method that created it.

Constructor

MediaStreamTrackAudioSourceNode()

Creates a new MediaStreamTrackAudioSourceNode object instance with the specified options.

Instance properties

The MediaStreamTrackAudioSourceNode interface has no properties of its own; however, it inherits the properties of its parent, AudioNode.

Instance methods

Inherits methods from its parent, AudioNode.

Example

See AudioContext.createMediaStreamSource() for example code that uses this object.

Specifications

Specification
Web Audio API
# MediaStreamTrackAudioSourceNode

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
MediaStreamTrackAudioSourceNode
MediaStreamTrackAudioSourceNode() constructor

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

See also