title: WebRTC getUserMedia not showing video
body: <p>I have the following code:</p>
  
  <pre><code>document.addEventListener('DOMContentLoaded', function () {
  
    var video = document.querySelector('video');
  
    window.navigator.webkitGetUserMedia({ video: true, audio: true }, function (stream) {
  
      var url = window.webkitURL.createObjectURL(stream);
      video.src = stream;
  
    }, function (err) {
      console.log('error: ', err);
    });
  
  });
  </code></pre>
  
  <p>Html:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset='utf-8'&gt;
    &lt;title&gt;getUserMedia Video Example&lt;/title&gt;
    &lt;script src='index.js'&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;video controls autoplay /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Why isn't it showing video?</p>