diff --git a/webaudioapi/waa.d.ts b/webaudioapi/waa.d.ts index d6960bbb31..accd5c01c9 100644 --- a/webaudioapi/waa.d.ts +++ b/webaudioapi/waa.d.ts @@ -86,6 +86,11 @@ interface AudioContext { */ createMediaStreamSource(mediaStream: any): MediaStreamAudioSourceNode; + /** + * Creates a MediaStreamAudioDestinationNode. + */ + createMediaStreamDestination(): MediaStreamAudioDestinationNode; + /** * Creates a ScriptProcessorNode for direct audio processing using JavaScript. An exception will be thrown if bufferSize or numberOfInputChannels or numberOfOutputChannels are outside the valid range. * It is invalid for both numberOfInputChannels and numberOfOutputChannels to be zero. @@ -1142,3 +1147,17 @@ interface WaveTable { */ interface MediaStreamAudioSourceNode extends AudioSourceNode { } + +/** + * This interface is an audio destination representing a MediaStream with a single AudioMediaStreamTrack. This MediaStream is created when the node is created and is accessible via the stream attribute. This stream can be used in a similar way as a MediaStream obtained via getUserMedia(), and can, for example, be sent to a remote peer using the RTCPeerConnection addStream() method. + * + * numberOfInputs : 1 + * numberOfOutputs : 0 + * + * channelCount = 2; + * channelCountMode = "explicit"; + * channelInterpretation = "speakers"; + */ +interface MediaStreamAudioDestinationNode extends AudioNode { + stream: MediaStream; +}