MediaStreamAudioDestinationNode.stream
The stream property of the AudioContext interface represents a MediaStream containing a single audio MediaStreamTrack with the same number of channels as the node itself.
You can use this property to get a stream out of the audio graph and feed it into another construct, such as a Media Recorder.
Syntax
var audioCtx = new AudioContext(); var destination = audioCtx.createMediaStreamDestination(); var myStream = destination.stream;
Value
A MediaStream containing a single audio track. The audio track is a MediaStreamTrack whose kind is audio.
Example
See AudioContext.createMediaStreamDestination() for example code that creates a MediaStreamAudioDestinationNode and uses its stream property as a source for audio to be recorded.
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 | |
stream |
14 |
≤18 |
25 |
No |
15 |
6 |
≤37 |
18 |
25 |
14 |
6 |
1.0 |
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamAudioDestinationNode/stream