W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > January 2018

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

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Wed, 03 Jan 2018 14:37:41 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-355026902-1514990260-sysbot+gh@w3.org>
@henbos The `track` events are already fired last, when everything is in place, so this can't happen.

What I suggest in https://github.com/w3c/webrtc-pc/issues/1691#issuecomment-352919912 is basically this order:

 1. For each *track* in *muteTracks*, [set the muted state](https://rawgit.com/w3c/mediacapture-main/master/getusermedia.html#set-track-muted) to the value `true`.
 2. For each *stream*+*track* pair in *removeList*, [remove the track](https://rawgit.com/w3c/mediacapture-main/master/getusermedia.html#remove-track) *track* from *stream* and fire `"removetrack"` event on *stream*.
 3. For each *stream*+*track* pair in *addList*, [add the track](https://rawgit.com/w3c/mediacapture-main/master/getusermedia.html#remove-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 https://github.com/w3c/webrtc-pc/issues/1691#issuecomment-355026902 using your GitHub account
Received on Wednesday, 3 January 2018 14:37:43 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:43 UTC