Re: [webrtc-pc] End removed tracks remotely again; Make receiver.track nullable instead

At the June virtual interim we came up with https://github.com/w3c/webrtc-pc/issues/1377 to give sites a way to detect remote track removal both in the spec and Chrome [today](https://jsfiddle.net/jib1/4raq8tqc/), bridging an important transition period.

Basically, of the two approaches:
```js
track.onended = () => log(`Track ${track.id} ended.`);
stream.onremovetrack = e => log(`Track ${e.track.id} removed.`);
```
only the first one would break.

Unfortunately, Firefox does not do the second one yet (though we'd add it asap).

It's still unclear however how web compatible this is. Anecdotally, it seems like few sites would be affected, just from the difficulty of dealing with browser differences when it comes to adding/removing tracks, but we don't know.

 @foolip can we find out how many sites are using `pc.removeStream` and/or are listening to the `ended` event either with `track.onended` or `addEventListener`?

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

Received on Thursday, 15 June 2017 16:36:29 UTC