title: Chrome - createMediaElementSource not working
body: <p>I have a simple audio analyzer for my website: </p>
  
  <pre><code>var analyser = document.getElementById('analyzer');
  var beat = document.getElementById('track_meta')
  var canvas, ctx, source, context, analyser, fbc_array, bars, bar_x,
  bar_width, bar_height;
  
  function playAnalyzer() {
      context = new AudioContext();
      analyser = context.createAnalyser();
      canvas = document.getElementById('analyzer');
      ctx = canvas.getContext('2d');
      source = context.createMediaElementSource(playerE);
      source.connect(analyser);
      analyser.connect(context.destination);
      frameLooper();
  }
  
  function frameLooper() {
      canvas.width  = canwidth;
      canvas.height = canheight;
      ctx.imageSmoothingEnabled = false;
      window.requestAnimationFrame(frameLooper);
      fbc_array = new Uint8Array(analyser.frequencyBinCount);
      analyser.getByteFrequencyData(fbc_array);
      ctx.clearRect(0, 0, canvas.width, canvas.height); // Clear the canvas
      ctx.fillStyle = "white"; // Color of the bars
      function valBetween(v, min, max) {
      return (Math.min(max, Math.max(min, v)));
      }
      var beatc = fbc_array[2] / 4;
      var beatround = Math.round(beatc);
      //if (beatround &lt; 10) {
      //    ctx.globalAlpha = '0.1125';
      //}
      //else {
      //    ctx.globalAlpha = '0.' + beatround;
      //}
      bars = canbars;
      for (var i = 0; i &lt; bars; i += canmultiplier) {
          bar_x = i * canspace;
          bar_width = 2;
          bar_height = -3 - (fbc_array[i] / 2);
          ctx.fillRect(bar_x, canvas.height, bar_width, bar_height);
      }
  }
  </code></pre>
  
  <p>My issue is that this does not work unless I am in incognito mode on chrome, otherwise I get this error:</p>
  
  <blockquote>
    <p>Uncaught InvalidStateError: Failed to execute 'createMediaElementSource' on 'AudioContext': HTMLMediaElement already connected previously to a different MediaElementSourceNode.</p>
  </blockquote>
  
  <p>I've tested this in Edge, Firefox and Opera and there it works fine. I've even reinstalled chrome to see if that would fix the issue to no avail. I just don't understand why it works fine in incognito mode but not otherwise. </p>
  
  <p>So my question is, is it possible instead of using the <code>&lt;audio&gt;</code> element, connect the analyzer to a <code>var audio = new Audio</code> instead? If so, how would I do this?</p>