Re: [webrtc-pc] When to fire events triggered by setRemoteDescription.

@henbos The `track` events are already fired last, when everything is in place, so this can't happen.

What I suggest in is basically this order:

 1. For each *track* in *muteTracks*, [set the muted state]( to the value `true`.
 2. For each *stream*+*track* pair in *removeList*, [remove the track]( *track* from *stream* and fire `"removetrack"` event on *stream*.
 3. For each *stream*+*track* pair in *addList*, [add the track]( *track* to *stream* and fire `"addtrack"` event on *stream*.
 4. For each  *trackEvent* in *trackEvents*, fire a track event named `"track"` with *trackEvent* at the *connection* object.

1 and 4 are already in the spec. With the media capture algorithms already idempotent, there's no chance of failure.

GitHub Notification of comment by jan-ivar
Please view or discuss this issue at using your GitHub account

Received on Wednesday, 3 January 2018 14:37:43 UTC