Re: [webrtc-pc] setRemoteDescription and ontrack order of events: SRD before ontrack?

> ensure that when each track event fires, the stream in the event has a full list of tracks

> This results in addtrack and removetrack events firing, but note that this processing happens before we fire the ontrack and exposing the new streams, so there will be no chance to hook up anything to the streams' onaddtrack. Is this on purpose?

If the streams (a track may be in more than one) are fully populated ahead of the `track` event, then it makes sense to me that users who hook the streams' `onaddtrack` or `onremovetrack` from within the first `ontrack` only hear of future renegotiations.

Note that [mediacapture](https://w3c.github.io/mediacapture-main/getusermedia.html#stream-inactive) appears to queue a task for each firing of `addtrack` or `removetrack` events on the stream, but the order should still hold, provided we continue to queue a task to fire the `track` event.

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

Received on Tuesday, 1 August 2017 00:11:13 UTC