W3C home > Mailing lists > Public > public-webrtc@w3.org > August 2017

[webrtc-pc] Pull Request: Allow createAnswer to be called only in valid signaling state

From: Soares Chen via GitHub <sysbot+gh@w3.org>
Date: Wed, 23 Aug 2017 07:54:50 +0000
To: public-webrtc@w3.org
Message-ID: <pull_request.opened-137152227-1503474881-sysbot+gh@w3.org>
soareschen has just submitted a new pull request for https://github.com/w3c/webrtc-pc:

== Allow createAnswer to be called only in valid signaling state ==
Fixes #1183.

This makes createAnswer throw `InvalidStateError` if the signaling state is not `have-remote-offer` or `have-local-pranswer`. Checking signaling state also implicitly assert that `pendingRemoteDescription` is set, so that checking is removed.

There is a breaking change here that existing implementations allow createAnswer to succeed after a call to `setLocalDescription(answer)`. Nevertheless the resulting new answer cannot be applied because the connection have transition  back to stable state. If anyone think it is important not to break this behavior, I am happy to modify the patch to only throw error if `pendingRemoteDescription` is not of type `offer`.

See https://github.com/w3c/webrtc-pc/pull/1549
Received on Wednesday, 23 August 2017 07:54:49 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:51 UTC