title: web audio in firefox
body: <p>i am trying to build a web app that visualises and and controls the source audio, it works brilliant in chrome, but completely breaks in firefox, it won't even play the audio. here is the code:</p>
  
  <pre><code>var audio = new Audio();
  audio.src='track.mp3';
  audio.controls = true;
  audio.loop = false;
  audio.autoplay = false;
  
  
  window.addEventListener("load", initPlayer, false);
  
  function initPlayer(){
    $("#player").append(audio);
  
    context = new AudioContext();
    analyser = context.createAnalyser();
    canvas = document.getElementById("vis");;
    ctx = canvas.getContext("2d");
  
    source = context.createMediaElementSource(audio);
    source.connect(analyser);
    analyser.connect(context.destination);
  
  }
  </code></pre>
  
  <p>the line that breaks everything is:</p>
  
  <pre><code>  source = context.createMediaElementSource(audio);
  </code></pre>
  
  <p>after adding this line the player just hangs at 0:00 in firefox. i have done my research and have come across CORS, but as far as i can understand this should be irrelevant as the file is kept on the same server.</p>
  
  <p>Please help</p>