title: getUserMedia questions - Stopping stream and local storage API
body: <p>I am working on implementing getUserMedia for audio/video and then having it saved via local storage through HTML5 api.  I have two issues.  </p>
  
  <p>The first issue is that when the audio connects it echos my voice very faintly and has a constant static sound (tested in firefox).   Is there any known issues with this, I was unable to find an answer of any sort.</p>
  
  <p>As well, is there documentation stopping and putting the mediaStream file into something to be saved via local storage or through ajax/php or anything like that?  I am a little lost on how to stop and then keep the file.</p>
  
  <p>MY JavaScript code and HTML code is below... THANK YOU!</p>
  
  <pre><code>&lt;section&gt;
          &lt;!-- &lt;audio controls autoplay&gt;&lt;/audio&gt; --&gt;
          &lt;video controls autoplay&gt;&lt;/video&gt;
          &lt;input id="startRecording" type="button" value="Start Recording"/&gt;
          &lt;input id="stopRecording" type="button" value="Stop Recording"/&gt;
  &lt;/section&gt;
  
  
  
  
  window.onload = function() {
  
  function hasGetUserMedia() {
      //Note: opera is unprefixed
      return !!(navigator.hasGetUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia);
  } //Check for Get User Media in browsers
  
  function startRecording() {
  
          navigator.getUserMedia({audio: true, video: true},function(stream) {audio.src = window.URL.createObjectURL(stream); },onFail);
  }
  
  function stopRecording() {
      var audio  = document.querySelector('video');
      audio.src = "";Q
  }
  
  var onFail = function(e) {
      console.log("ERROR");
  }
  var audio  = document.querySelector('video');
  
  if (hasGetUserMedia()) {
      //AWESOME!  Do whatever needs to be done
      window.URL = (window.URL || window.webkitURL || window.webkitURL || window.mozURL || window.msURL);
      navigator.getUserMedia = ( navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia );
  
      var startRecord =  document.getElementById('startRecording');
      var endRecord =  document.getElementById('stopRecording');
      startRecord.onclick = startRecording;
      endRecord.onclick = stopRecording;
  
  } else {
      alert("FAIL");
      //Put in fallback for flash/silverlight?
  } //Check for getUserMedia()
  
  } //load this stuff onload
  </code></pre>