{{APIRef("Web Audio API")}}
The MediaStreamAudioSourceNode
interface represents an audio source consisting of a WebRTC {{domxref("MediaStream")}} (such as a webcam or microphone.) It is an {{domxref("AudioNode")}} that acts as an audio source.
A MediaElementSourceNode
has no inputs and exactly one output, and is created using the {{domxref("AudioContext.createMediaStreamSource")}} method. The amount of channels in the output equals the number of channels in {{domxref("AudioMediaStreamTrack")}}. If there is no valid media stream, then the number of output channels will be one silent channel.
Number of inputs | 0 |
---|---|
Number of outputs | 1 |
Channel count | defined by the {{domxref("AudioMediaStreamTrack")}} passed to the {{domxref("AudioContext.createMediaStreamSource")}} method that created it. |
Properties
Inherits properties from its parent, {{domxref("AudioNode")}}.
Methods
Inherits methods from its parent, {{domxref("AudioNode")}}.
Example
{{page("/en-US/docs/Web/API/AudioContext.createMediaStreamSource","Example")}}
Specification
Specification | Status | Comment |
---|---|---|
{{SpecName('Web Audio API', '#the-mediastreamaudiosourcenode-interface', 'MediaStreamAudioSourceNode')}} | {{Spec2('Web Audio API')}} |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 14 {{property_prefix("webkit")}} | {{CompatGeckoDesktop("25")}} | {{CompatNo}} | 15 {{property_prefix("webkit")}} 22 (unprefixed) |
6 {{property_prefix("webkit")}} |
Feature | Android | Chrome | Firefox Mobile (Gecko) | Firefox OS | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|
Basic support | {{CompatNo}} | 28 {{property_prefix("webkit")}} | {{CompatGeckoMobile("25")}} | 1.2 | {{CompatNo}} | {{CompatNo}} | 6 {{property_prefix("webkit")}} |