Add section describing MediaStreamAudioDestinationNode
authorcrogers
Wed, 06 Feb 2013 14:50:32 -0800
changeset 260 333dbb6ffbc2
parent 259 69a39a516e45
child 261 6b54d1345924
Add section describing MediaStreamAudioDestinationNode
webaudio/specification.html
--- a/webaudio/specification.html	Mon Feb 04 16:06:13 2013 -0800
+++ b/webaudio/specification.html	Wed Feb 06 14:50:32 2013 -0800
@@ -291,6 +291,8 @@
       </li>
       <li><a href="#MediaStreamAudioSourceNode">4.25. The
         MediaStreamAudioSourceNode Interface</a></li>
+      <li><a href="#MediaStreamAudioDestinationNode">4.26. The
+        MediaStreamAudioDestinationNode Interface</a></li>
     </ul>
   </li>
   <li><a href="#MixerGainStructure">6. Mixer Gain Structure</a> 
@@ -835,6 +837,7 @@
     MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
 
     MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
+    MediaStreamAudioDestinationNode createMediaStreamDestination();
 
     ScriptProcessorNode createScriptProcessor(unsigned long bufferSize,
                                               optional unsigned long numberOfInputChannels = 2,
@@ -1024,6 +1027,16 @@
       into the processing graph of the AudioContext.</p>
     </dd>
 </dl>
+
+<dl>
+  <dt id="dfn-createMediaStreamDestination">The <code>createMediaStreamDestination</code>
+  method</dt>
+    <dd><p>Creates a <a
+      href="#MediaStreamAudioDestinationNode-section"><code>MediaStreamAudioDestinationNode</code></a>.
+      </p>
+    </dd>
+</dl>
+
 <dl>
   <dt id="dfn-createScriptProcessor">The <code>createScriptProcessor</code>
   method (please see the <a href="#deprecation-section">deprecation section</a> about name change)</dt>
@@ -3629,6 +3642,53 @@
 </div>
 </div>
 
+<div id="MediaStreamAudioDestinationNode-section" class="section">
+<h2 id="MediaStreamAudioDestinationNode">4.26. The MediaStreamAudioDestinationNode
+Interface</h2>
+
+<p>This interface is an audio destination representing a <code>MediaStream</code> with a single <code>AudioMediaStreamTrack</code>.
+This MediaStream is created when the node is created and is accessible via the <dfn>stream</dfn> 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.
+</p>
+<pre>    numberOfInputs  : 1
+    numberOfOutputs : 0
+</pre>
+
+<p>
+The number of channels of the input is by default 2 (stereo).  Any connections to the input
+are up-mixed/down-mixed to the number of channels of the input.
+</p>
+
+<div class="block">
+
+<div class="blockTitleDiv">
+<span class="blockTitle">Web IDL</span></div>
+
+<div class="blockContent">
+<pre class="code"><code class="idl-code">
+
+interface <dfn id="dfn-MediaStreamAudioDestinationNode">MediaStreamAudioDestinationNode</dfn> : AudioNode {
+
+    readonly attribute MediaStream stream;
+
+};
+</code></pre>
+</div>
+</div>
+
+<div id="attributes-MediaStreamAudioDestinationNode-section" class="section">
+<h3 id="attributes-MediaStreamAudioDestinationNode">4.26.1. Attributes</h3>
+<dl>
+  <dt id="dfn-stream"><code>stream</code></dt>
+    <dd><p>A MediaStream containing a single AudioMediaStreamTrack with the same number of channels
+    as the node itself.</p>
+    </dd>
+</dl>
+</div>
+
+</div>
+
 <div id="MixerGainStructure-section" class="section">
 <h2 id="MixerGainStructure">6. Mixer Gain Structure</h2>