[webrtc-pc] createOffer does not guard against "have-remote-offer" (#2145)

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

== createOffer does not guard against "have-remote-offer" ==
There's no limit on when *createOffer* may be called today. *"Unlike createOffer, repeated call to createAnswer cannot be used again with setLocalDescription because doing so is invalid in stable state."* https://github.com/w3c/webrtc-pc/issues/1183#issue-227312645

It seems the reason is *createOffer* may be called from `"stable"` *and* `"have-local-offer"`.

But @docfaraday pointed out to me that calling *createOffer* in `"have-remote-offer"` makes no sense, and would be difficult to implement. So we should guard against that.

I'll add a PR to reject with ` InvalidStateError` (which is what *createAnswer* uses today).

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

Received on Tuesday, 26 March 2019 20:18:26 UTC