title: Why the function "onaddstream" is never called?
body: <p>Hello I followed this tutorial to create a simple webrtc example.
  <a href="https://www.webrtc-experiment.com/docs/WebRTC-PeerConnection.html" rel="nofollow noreferrer">https://www.webrtc-experiment.com/docs/WebRTC-PeerConnection.html</a> . </p>
  
  <p>So look my JFFiddle:
  <a href="https://jsfiddle.net/xzspquew/9/" rel="nofollow noreferrer">https://jsfiddle.net/xzspquew/9/</a>
   and tell me please why I can't enter to the function onaddstream ? The console.log("this function is called") is neved called. Why ?</p>
  
  <pre><code>    navigator.getUserMedia({audio:false, video:true}, success, error)
  
  var pc = new RTCPeerConnection()
  var pc2 = new RTCPeerConnection()
  
  pc.onaddstream = function(event) {
      console.log("this function is called")
      var video2 = document.getElementById("video2")
    video2.src = window.URL.createObjectURL(event.stream)
    video2.play()
  }
  
  document.querySelector("#repondre").addEventListener('click', function repondre() {
    var answer = prompt("Please enter your sdp remote offer");
    console.log(answer)
    pc2.setRemoteDescription(JSON.parse(answer))
      pc2.createAnswer(successanswerrtc, errorrtc)
  })
  
  function successanswerrtc(answersdp) {
      pc2.setLocalDescription(answersdp)
    console.log(JSON.stringify(answersdp))
    pc.setRemoteDescription(answersdp)
  }
  
  function sucessrtc(offersdp) {
      pc.setLocalDescription(offersdp)
    alert(JSON.stringify(offersdp))
    console.log(JSON.stringify(offersdp))
  } 
  function errorrtc(err) {
      console.log("error" + err)
  }
  
  function success(stream) {
      var video1 = document.getElementById("video1")
    video1.src = window.URL.createObjectURL(stream)
    video1.play()
    pc.createOffer(sucessrtc, errorrtc)
  }
  function error() {
      console.log("error")
  }
  </code></pre>