Re: RTCSessionDescription and RTCIceCandidate

On 9/24/15 7:26 PM, Martin Thomson wrote:
> Apparently these serve a purpose: shibboleth.
>
> We can't have an attribute that is a dictionary.  This breaks
> localDescription and remoteDescription on RTCPeerConnection.
>
> Thus, I need to restore an interface for RTCSessionDescription.
>
> I've tried to think of ways to make this less awful, but I can't see
> any way to do so. Ideally, we'd make RTCSessionDescription attributes
> immutable, but applications have come to expect the attributes on
> RTCSessionDescription to be mutable. Thus, we have to have a copy of
> the actual session description from the local/remoteDescription
> getter.  Having to do that is why WebIDL forbids dictionary
> attributes.  So we get the worst of all possibilities.

Yeah that does stink. But aren't we in the process of deprecating 
localDescription in favor of currentLocalDesc? Should it be 
getCurrentLocalDesc() maybe, and return a dictionary?

FWIW this needn't hold back the other changes, as I believe one can pass 
an RTCSessionDescription interface to a method expecting an 
RTCSessionDescriptionInit dictionary (because the interface has a 
serializer). Could we keep the interface just for 
local/remoteDescription purposes, and still do the other changes (not 
requiring users to use the constructor)? That still seems like a win to me.

.: Jan-Ivar :.

Received on Monday, 28 September 2015 19:10:52 UTC