Back to Content

MediaStreamAudioDestinationNode: stream property

files/en-us/web/api/mediastreamaudiodestinationnode/stream/index.md

latest1.0 KB
Original Source

{{ APIRef("Web Audio API") }}

The stream property of the {{ domxref("AudioContext") }} interface represents a {{domxref("MediaStream")}} containing a single audio {{domxref("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.

Value

A {{domxref("MediaStream")}} containing a single audio track. The audio track is a {{domxref("MediaStreamTrack")}} whose {{domxref("MediaStreamTrack.kind", "kind")}} is audio.

Examples

See AudioContext.createMediaStreamDestination() for example code that creates a MediaStreamAudioDestinationNode and uses its stream property as a source for audio to be recorded.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also