https://w3c.github.io/webrtc-pc/#interface-definition
Both Blink and Gecko use RTCSessionDescription here, at least in the IDL:
https://github.com/mozilla/gecko-dev/blob/d3b37a02baa51459a8745ef9449c234cd26f8d1c/dom/webidl/RTCPeerConnection.webidl#L99
https://chromium.googlesource.com/chromium/src/+/b3ccf01a59d182eee56040de8624d4b1b01abe73/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl#71
@jan-ivar
Wouldn't this imply that .type is readonly which would disallow changing the type of answer to pranswer?
See createAnswer, in particular
An answer can be marked as provisional, as described in [JSEP] (section 4.1.7.1.), by setting the type to pranswer.
@foolip This would appear to make the problem you mention in https://github.com/w3c/webrtc-pc/issues/573#issuecomment-259103219 more common.
OK, so there's a use case for modifying the return value. (I know little about the semantics and am just noticing differences between spec and implementations, so pardon if this was obvious.)
The way it's implemented in Blink is to create a new RTCSessionDescription instance, and because its attributes are mutable it would work. But to change RTCSessionDescription to be immutable without without also changing RTCSessionDescription to RTCSessionDescriptionInit in these contexts would be risky.
So, I conclude that if the RTCSessionDescription changes turn out not be web compatible and need to be reverted, then that would be the time to change this as well. Does that sound about right? If so, this can be closed for now, and be revisited if https://github.com/w3c/webrtc-pc/issues/573 doesn't work out.
PR-Answer is being discussed in RTCWEB. That discussion may converge in Korea.
Is this solved by #949?
This issue basically observes that implementations are behind the spec, which I'm about to fix.
@foolip said this could be closed, and I agree. https://github.com/w3c/webrtc-pc/pull/949 was about the legacy callbacks.
OK, closing.