-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing interface use for RTCSessionDescription and RTCIceCandidate #302
Conversation
Is it safe to remove the constructors? I was under the impression they were used in quite a bit of developer documentation, and thus presumably in actual deployed code. |
Yes, the constructors are used by every piece of code that uses WebRTC because they are needed in the current API. We would, as a matter of practice, retain the constructors for a significant amount of time to avoid breaking things. |
Shouldn't there be some text indicating that the constructors are there purely for legacy reasons? |
List discussion ongoing. |
There has been some list discussion, and no-one seem to object this change, so I think we should merge. |
I just realized that there is a problem with this PR. You can't have dictionary attributes on an interface. |
Good catch. That is indeed a problem. And we have the same issue with the RTCPeerConnectionIceEvent interface and its candidate attribute. |
Still, we could (as @jan-ivar suggested) make it possible to use the init dictionaries as arguments to addIceCandidate / set*Description. |
I wish we had a special "pass by value" attribute in WebIDL. Because that's what we're doing with the local/remoteDescription attributes anyway. |
8323b58
to
beb10fe
Compare
OK, I've updated the PR. All the
We could use a named getter to return a dictionary, but that would look terrible and have some unwanted side-effects. Or, we could request a change to WebIDL that allowed us to return a dictionary. Or, we could annotate as you suggest. |
Removing interface use for RTCSessionDescription and RTCIceCandidate
We currently force people to do this:
This is nicer:
Same for session descriptions.