[webrtc-pc] pc.getSenders() and getReceivers() include stopped ones.

jan-ivar has just created a new issue for https://github.com/w3c/webrtc-pc:

== pc.getSenders() and getReceivers() include stopped ones. ==
Here's how I'd play pc tracks without any associated streams:
```js
video.srcObject = new MediaStream(pc.getTransceivers()
                                  .filter(tc => !tc.stopped)
                                  .map(tc => tc.receiver.track));
```
The problem is, [EXAMPLE 11](http://w3c.github.io/webrtc-pc/#peer-to-peer-example-with-media-before-signaling) uses:
```js
remoteView.srcObject = new MediaStream(pc.getReceivers().map(r => r.track));
```

Unfortunately, the latter and shorter incantation might include stopped receivers I'm not expecting.

Worse, `pc.getReceivers()` offers no easy way to tell whether my receivers are stopped or not. 

Maybe it should only return non-stopped receivers?

Same question for `pc.getSenders()`.

It turns out *HTMLVideoElement* conveniently ignores ended tracks, so the above still works. But this just seems to bury the surprise even further, and I could see people tripping over this in other situations.

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1975 using your GitHub account

Received on Wednesday, 29 August 2018 12:49:17 UTC