W3C home > Mailing lists > Public > public-webrtc@w3.org > October 2015

Interfaces > dictionaries

From: Martin Thomson <martin.thomson@gmail.com>
Date: Wed, 21 Oct 2015 13:54:51 -0700
Message-ID: <CABkgnnWfyKESJ=C5z-Hbu2xjWuQ6Hyb39At-4eu4R+xkuToqAg@mail.gmail.com>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
I've submitted a PR that changes a bunch of the support infrastructure
for RTCRtpSender.[gs]etParameters() to interfaces.

The PR has a longer discussion of the trade-offs and rationale (included below):


There are very few things in here that are actually mutable as it
turns out. Having them as dictionaries is contrary to some of the
advice I've received internally on the design of web APIs.

Most of the entire tree can be safely turned into interfaces with
readonly attributes. I think that ideally we should move getParameters
to an attribute, but I don't want to re-open that discussion again. I
get the point of having an atomic setParameters though I think that
we'll find that it isn't necessary in practice.

One consequence of this is that it is much more clear now on what can
be changed and what cannot. The SSRC was the only one that was
previously mutable, which might have been inadvisable with a=ssrc in
such heavy use; with the move to RID-based identification, I think
that I can accept this being changed.

The main consequence of this change is that you have to take a copy of
the parameters if you want to change them. I think that this is an
acceptable cost.
Received on Wednesday, 21 October 2015 20:55:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:18:09 UTC