Re: [webrtc-pc] does MSID still work? (was: example 13: getReceivers semantics)

Here's why it sucks: Any moderately complex website today is going to want to correlate remote streams and tracks to local streams and tracks. They'll need to use msid for that today.

As an example, take this [simple Firefox fiddle](https://jsfiddle.net/jib1/aanj0zay/) that sends two videos, and swaps them after 3 seconds. Without correlating streams, there's no telling which video ends up on the left vs. right. Thus the fiddle correlates streams like this today:
```js
  let videos = {[streamA.id]: videoA, [streamB.id]: videoB};

  pc2.ontrack = ({streams: [stream]}) => {
    let video = videos[stream.id];
    if (!video.srcObject) video.srcObject = stream;
  }
```
vs. like this tomorrow:
```js
  let videos = {[transceiverA.mid]: videoA, [transceiverB.id]: videoB};

  pc2.ontrack = ({transceiver, streams: [stream]}) => {
    let video = videos[transceiver.mid];
    if (!video.srcObject) video.srcObject = stream;
  }
```

Luckily, both should continue to work, since I'm correlating streams not tracks.

What's not intuitive is that the same does not hold for track.ids, even though we'll continue to have them. I don't have a fiddle that swaps tracks, but you can easily imagine one I hope.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1128#issuecomment-298394432 using your GitHub account

Received on Monday, 1 May 2017 18:25:19 UTC