MediaStreamTrackAudioSourceNode
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
TheMediaStreamTrackAudioSourceNode interface is a type ofAudioNode which represents a source of audio data taken from a specificMediaStreamTrack obtained through theWebRTC orMedia Capture and Streams APIs.
The audio itself might be input from a microphone or other audio sampling device, or might be received through aRTCPeerConnection, among other possible options.
AMediaStreamTrackAudioSourceNode has no inputs and exactly one output, and is created using theAudioContext.createMediaStreamTrackSource() method. This interface is similar toMediaStreamAudioSourceNode, except it lets you specifically state the track to use, rather than assuming the first audio track on a stream.
| Number of inputs | 0 |
|---|---|
| Number of outputs | 1 |
| Channel count | defined by the first audioMediaStreamTrack passed to theAudioContext.createMediaStreamTrackSource() method that created it. |
In this article
Constructor
MediaStreamTrackAudioSourceNode()Creates a new
MediaStreamTrackAudioSourceNodeobject instance with the specified options.
Instance properties
TheMediaStreamTrackAudioSourceNode 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
SeeAudioContext.createMediaStreamSource() for example code that uses this object.
Specifications
| Specification |
|---|
| Web Audio API> # MediaStreamTrackAudioSourceNode> |