title: Forwarding a Javascript MediaStream
body: <p>I am currently implementing a multiplex server for WebRTC audio/video connections. Every peer that wants to participate in a conference call sends its MediaStream via a PeerConnection to the server. The server puts those connections into a pool of all received connections and sends them out to the connected peers. So far, so good.
  Now it gets interesting. When I use a MediaStream from the pool as the streaming source for a new connection, I get an error that says: 'Failed to execute addStream on RTCPeerConnection: Unable to add the provided stream.'
  So I did the following approach:</p>
  
  <ol>
  <li>Instead of pooling the received MediaStream, I cloned it and pooled the clone. Still fails.</li>
  <li>Instead of sending a pooled MediaStream, I've sent the webcam stream of the server (runs locally atm) and it worked.</li>
  <li>Instead of sending a pooled MediaStream, I took the webcam stream, cloned it, removed the VideoTrack, added the VideoTrack of the pooled stream, sent this Frankenstein-Stream, worked.</li>
  <li>Also swapped the AudioTrack in the same way, fails. </li>
  <li>Instead of swapping the AudioTrack, I just added the track from the pooled stream without removing the original one, failed. </li>
  </ol>
  
  <p>What the hell?</p>
  
  <p>I know that there are projects like Licode, which implement MUC server for WebRTC. But when using it, I lose lots of freedom concerning the server side, which is not desired in this project.
  So does anyone of you have any idea what's going wrong? What is the problem with simply forwarding a MediaStream that I received?</p>
  
  <p>Best,
  Felix</p>