W3cubDocs

/Web APIs

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

new 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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
MediaStreamTrackAudioSourceNode No No
68Firefox 68 implements the updated standard's definition of the "first" audio track; now the first track is the one whose ID comes first lexicographically.
No No No No No
68Firefox 68 implements the updated standard's definition of the "first" audio track; now the first track is the one whose ID comes first lexicographically.
No No No
MediaStreamTrackAudioSourceNode No No 68 No No No No No 68 No No No

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackAudioSourceNode