This is the doubt i have off the top of my head,

 

Suppose a PeerConnection has two stream objects with same ID, for example streamId_1 (I resumbled this with the case, getting our own streams reflected back to us).

Now the JS application is trying to add the track using addTrack,

addTrack(track, streamId_1);

This call invokes the browser code to add the track,

 

Here I confused to analyse the result at both places, at JS end as well as browser end.

1. How the JS can come to know to which of the two streams, the track is added.

2. Since two streams have same ID, after invoking the browser code, how the browser has to identify to which stream object, this track need to be added.

 

 

 

------- Original Message -------

Sender : Harald Alvestrand<harald@alvestrand.no>

Date : May 08, 2014 20:13 (GMT+09:00)

Title : Re: Next steps on RTCRtpSender "doohickey" proposal

 

On 05/08/2014 12:34 PM, Kiran Kumar Guduru wrote:

In spec it is specified that mediaStream ids may  be duplicated.

"The id of a MediaStream object is unique to the source of the stream, but that does not mean it is not possible to end up with duplicates."

 

In this scenario,

How to differentiate two streams with same Id?


Are you talking about the perspective of a Javascript programmer, or the perspective of a browser writer?

The case where it can occur is if you get the same stream (same ID) via two different PeerConnections, or get your own streams reflected back at you.

I'm not sure it's a problem for the Javascript programmer. But it argues for stating the addtrack API in terms of stream objects, not stream IDs (since there may be two objects with the same ID).