Interfaces > dictionaries

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):

  https://github.com/w3c/webrtc-pc/pull/350

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