- From: jan-ivar via GitHub <sysbot+gh@w3.org>
- Date: Wed, 06 Dec 2017 23:41:03 +0000
- To: public-webrtc-logs@w3.org
The reason we have two things is that dictionaries cannot be attributes: ```js readonly attribute RTCSessionDescription? localDescription; ``` ...yet at the same time we want to write: ```js pc.setLocalDescription({sdp: sdpString, type: "offer"}); ``` > an RTCSessionDescription is capable of being converted to an RTCSessionDescriptionInit? 👍 The former browser object is valid input to a method expecting the latter dictionary, but not vise versa. Conceptually they're interchangeable. Unfortunately, the better name is taken by the legacy constructor. We have prose that mixes concept and type in places, like: *"The initial value of `mid` is null. Setting a new `RTCSessionDescription` may change it to a non-null value, as defined in [JSEP] (section 5.5. and section 5.6.)."* In this case, [section 5.5](https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-20#section-5.5) actually uses "SessionDescription" (though [section 4.1.8](https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-20#section-4.1.8) suggests this means `RTCSessionDescription`). In either case, it sounds odd to say: *"The initial value of `mid` is null. Setting a new `RTCSessionDescriptionInit` may change it to a non-null value, as defined in [JSEP] (section 5.5. and section 5.6.)."* ...even though we probably should. This also highlights that we should probably link to our own [setting an RTCSessionDescription](https://rawgit.com/fippo/webrtc-pc/cb8db929324c094144574ff6c8ce03f28f2640bb/webrtc.html#set-description) algorithm here. -- GitHub Notification of comment by jan-ivar Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1477#issuecomment-349812127 using your GitHub account
Received on Wednesday, 6 December 2017 23:41:05 UTC