Bug 17346: HTMLMediaElement integration
authorcrogers
Tue, 09 Oct 2012 16:08:50 -0700
changeset 183 9224fb26e77d
parent 182 f4bfa16b820d
child 184 cb14c7445a27
Bug 17346: HTMLMediaElement integration
webaudio/specification.html
--- a/webaudio/specification.html	Tue Oct 09 15:20:50 2012 -0700
+++ b/webaudio/specification.html	Tue Oct 09 16:08:50 2012 -0700
@@ -291,8 +291,6 @@
         MediaStreamAudioSourceNode Interface</a></li>
     </ul>
   </li>
-  <li><a href="#AudioElementIntegration">5. Integration with the
-    <code>audio</code> and <code>video</code> elements</a></li>
   <li><a href="#MixerGainStructure">6. Mixer Gain Structure</a> 
     <ul>
       <li><a href="#background">Background</a></li>
@@ -1999,6 +1997,45 @@
 </div>
 </div>
 
+<p>A MediaElementAudioSourceNode
+is created given an HTMLMediaElement using the AudioContext <a href="#dfn-createMediaElementSource">createMediaElementSource()</a> method. </p>
+
+<p>
+The number of channels of the single output equals the number of channels of the audio referenced by
+the HTMLMediaElement passed in as the argument to createMediaElementSource(), or is 1 if the HTMLMediaElement
+has no audio.
+</p>
+
+<p>
+The HTMLMediaElement must behave in an identical fashion after the MediaElementAudioSourceNode has
+been created, <em>except</em> that the rendered audio will no longer be heard directly, but instead will be heard
+as a consequence of the MediaElementAudioSourceNode being connected through the routing graph.  Thus pausing, seeking,
+volume, <code>.src</code> attribute changes, and other aspects of the HTMLMediaElement must behave as they normally would
+if <em>not</em> used with a MediaElementAudioSourceNode.
+</p>
+
+<div class="example">
+
+<div class="exampleHeader">
+Example</div>
+
+<div class="block">
+
+<div class="blockTitleDiv">
+<span class="blockTitle">ECMAScript</span></div>
+
+<div class="blockContent">
+<pre class="code"><code class="es-code"> 
+var mediaElement = document.getElementById('mediaElementID');
+var sourceNode = context.createMediaElementSource(mediaElement);
+sourceNode.connect(filterNode);</code></pre>
+ </code></pre>
+</div>
+</div>
+</div>
+</div>
+
+
 <div id="JavaScriptAudioNode-section" class="section">
 <h2 id="JavaScriptAudioNode">4.12. The JavaScriptAudioNode Interface</h2>
 
@@ -3307,29 +3344,6 @@
 </div>
 </div>
 
-
-<div id="AudioElementIntegration-section" class="section">
-<h2 id="AudioElementIntegration">5. Integration with the <code>audio</code> and
-<code>video</code> elements</h2>
-
-<p>A <a
-href="#MediaElementAudioSourceNode-section"><code>MediaElementAudioSourceNode</code></a>
-can be created from an HTMLMediaElement using an AudioContext method. </p>
-
-<div class="block">
-
-<div class="blockTitleDiv">
-<span class="blockTitle">ECMAScript</span></div>
-
-<div class="blockContent">
-<pre class="code"><code class="es-code"> 
-var mediaElement = document.getElementById('mediaElementID');
-var sourceNode = context.createMediaElementSource(mediaElement);
-sourceNode.connect(filterNode);</code></pre>
-</div>
-</div>
-</div>
-
 <div id="MixerGainStructure-section" class="section">
 <h2 id="MixerGainStructure">6. Mixer Gain Structure</h2>