title: How to avoid the flash when switching streams in webrt?
body: <p>The following code is to test the performance when switching the localVideo.src to different streams in webrtc. There is a flash in the video element when its source switching from stream1 to stream2. </p>
  
  <p>Is there a way to avoid the flash? like when we watch youtube videos and change its quality, the screen will pause and then play without flash. As what i have learnt, it is actually switching to another video.</p>
  
  <pre><code>navigator.getUserMedia({ video: true, audio: true }, function (stream1) {
    self.localVideo.src = window.URL.createObjectURL(stream1);
    self.stream2 = stream;
    setInterval(function(){
      console.log("switch to stream 2");
      self.localVideo.src  = window.URL.createObjectURL(self.stream2);
    }, 5000);
  }
  </code></pre>