[webrtc-pc] Timing of setRemoteDescription's identity validation is unclear (#2173)

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

== Timing of setRemoteDescription's identity validation is unclear ==
The steps under [setRemoteDescription](https://w3c.github.io/webrtc-pc/#dom-peerconnection-setremotedescription) talk about two things:
  1. calling the [setting an RTCSessionDescription](http://w3c.github.io/webrtc-pc/#set-description) algorithm, and
  2. validating any identity assertion.

But it doesn't nail down the timing between the two. This must be clarified.

I believe the [setting an RTCSessionDescription](http://w3c.github.io/webrtc-pc/#set-description) algorithm needs to go last, because it fires a ton of events, and queues a task to [update the negotiationneeded flag](http://w3c.github.io/webrtc-pc/#dfn-update-the-negotiation-needed-flag), something that is timed to happen after the JS success callback.

Blocking on identitiy validation beyond that point in time would ruin invariants that callers of the API rely on.

Likewise, in the case where SRD success is blocked on verifying an identity assertion, holding off on firing a ton of media events until the identity has been positively verified, seems wise.

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

Received on Monday, 15 April 2019 21:13:34 UTC