WebRTC Adding remote stream to PeerConnection
<p>I'm working on WebRTC for Android. And successful create and establish Conference. Using single MediaStream and several PeerConnection. </p>

<p>Now I want to find a better way, and one of them it's relay connection. My question is, crating relay as described on <a href="https://bugs.chromium.org/p/webrtc/issues/detail?id=5362" rel="nofollow">Chromium Report</a>. And I supposed to do same thing, but there several issues. So lets start. </p>

<ol>
<li>Make a successful peer connection. (A -> B)</li>
<li>Relay the remote media stream using another peer connection ( B -> C).</li>
<li>The relayed media stream (A ->-> C) should be played on the final endpoint. </li>
</ol>

<p>So for User B, we should take remote stream from PeerConnection of User A, and add stream to the PeerConnection of User C. And how it make with Java library?</p>

<pre><code>// Local Media Stream, just as example for this question
// Local stream of current User B
MediaStream mediaStream = new MediaStream(...);

PeerConnection peerA = new PeerConnection(...);
PeerConnection peerC = new PeerConnection(...);

peerA.addStream(mediaStream);
peerB.addStream(mediaStream);

// Now this User (User B) can here User A and B
// Connection successful establish. 

// Here is question, how I can fetch remote 
// MediaStream object from PeerConnection A?
</code></pre>

<p><strong>How I can fetch remote MediaStream objects from PeerConnection A and adding them to the other PeerConnection C?</strong></p>

<hr>

<p>What I also tried to do, its fetching RTPSender and RTPReceiver from PeerConnection. After that I can access to the MediaStreamTrack of remote site. But I cannot put this object to the other PeerConnection.</p>