title: How can I determine the number of audio channels in a <video> tag? (HTML5)
body: <p>I am wanting to attach an AnalyserNode to each audio channel of a video element so that I can do some audio visualization.</p>
  
  <p>My code works at the moment except that the AudioContext and MediaElementAudioSourceNode both report a channel count of 2 regardless of how many audio channels there actually are in the video.</p>
  
  <pre><code>let context = new AudioContext();
  let source = context.createMediaElementSource(videoElement);
  let srcChannelCount = source.channelCount;  // Always 2!!!
  </code></pre>
  
  <p>In the case I'm testing I have generated a webm file with 1 audio stream containing 8 channels. If I hardcode my srcChannelCount variable to a particular number of channels (e.g. <code>let srcChannelCount = 8;</code>) my visualization correctly shows the data for each of the 8 channels, however I'd like the code to detect the number of channels based on the video file.</p>
  
  <p>Can anyone tell me how to determine the actual source audio channel count?</p>