[webrtc-pc] setRemoteDescription() adding and removing tracks to streams should be synchronous

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

== setRemoteDescription() adding and removing tracks to streams should be synchronous ==
trackEventInits, muteTracks, addList and removeList were added to make events firing well defined and immediate, so that the application does not get ahold of objects before they are properly updated according to the algorithm.

With regards to addList and removeList, we reference [mediacapture-streams](https://www.w3.org/TR/mediacapture-streams/#mediastream) for adding and removing tracks to the stream.

This does fire the event synchronously after adding/removing the stream (good), but as is written the algorithm is supposed to be executed by queuing a "task that runs the following steps". The same goes with muting.

This means that "ontrack" will fire first, exposing tracks and streams to the application, and then after a delay the tracks will be unmuted, added to the streams, etc.

Do we need to revisit these things to not say "queue a task that"? (Leaving any necessary queuing to the caller of these algorithms)

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

Received on Wednesday, 26 September 2018 15:03:57 UTC