title: How to use webrtc insde google chrome extension?
body: <p>I have developped a google chrome extension.</p>
  
  <p>I am trying now to integrate webRTC feature inside: </p>
  
  <pre><code>navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
  console.log("step1");
  navigator.getUserMedia({audio: true, video: true}, function(stream){
      console.log("step2");
      $('#myVideo').prop('src', URL.createObjectURL(stream));
      window.localStream = stream;
      console.log("step3");
  
    }, function(error){ 
      console.log(error);
   });
  </code></pre>
  
  <p>I got an error: </p>
  
  <pre><code>step1
  NavigatorUserMediaError {constraintName: "", message: "", name: "InvalidStateError"}
  </code></pre>
  
  <p>Any idea ?</p>
  
  <p>Do I need any special permission to use webrtc inside my extension ? and is it possible to access webrtc in a extension ?</p>
  
  <p>regards</p>
  
  <p>Here is the screenshot of what I call the "popup" (extension = popup + background)
  <img src="https://i.stack.imgur.com/lbrmI.jpg" alt="Pop up window = chrome extension"></p>