title: convert local video file into media stream
body: <p>I want to experiment file streaming using webRTC. It works perfectly with the camera/micro live (getUserMedia) but when I try to give it a pre-recorderd video file, I got this answer :</p>
  
  <pre><code>Uncaught TypeError: Failed to execute 'addStream' on 'RTCPeerConnection': parameter 1 is not of type 'MediaStream'.
  </code></pre>
  
  <p>Is there a simple way to use RTCPeerConnection with selected files like with .getUserMedia() ?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Here is how I get the file but when I try to add the 'localStream' with the addStream method of RTCPeerConnection, it fail...</p>
  
  <pre><code>var localVideo = document.createElement("video");
  var remoteVideo = document.createElement("video");
  
  function onchange( event ){
  
      var file = this.files[0];
      var type = file.type;
  
      if( localVideo.canPlayType(type) ){
  
          var localStream = window.URL.createObjectURL(file);
  
          localVideo.src = localStream;
  
          ...
  
          peer.addStream(localStream); // fail here
  
      };
  
  };
  </code></pre>