Closed
Bug 1181768
Opened 10 years ago
Closed 9 years ago
Implement already-defined RTCPeerConnection.getConfiguration
Categories
(Core :: WebRTC: Signaling, defect, P1)
Core
WebRTC: Signaling
Tracking
()
RESOLVED
FIXED
mozilla48
backlog | webrtc/webaudio+ |
People
(Reporter: mt, Assigned: jib)
References
Details
Attachments
(1 file)
The current situation is poor:
- getConfiguration is defined in WebIDL, but not actually implemented in PeerConnection.js
- updateIce is in the WebIDL and PeerConnection.js, though it only generates a NotImplemented error; but it has been removed from the spec
- setConfiguration is in the spec, but nowhere else
We actually have a configuration, we could return it. We could reject any attempts to set a configuration the same way. updateIce can go.
Updated•10 years ago
|
Assignee: nobody → jib
backlog: --- → webRTC+
Rank: 15
Assignee | ||
Comment 1•9 years ago
|
||
Part of implementing setConfiguration will be to figure out the desired effects of changing things mid-connection. E.g. iceTransportPolicy, Bug 1187775 comment 5.
Assignee | ||
Comment 2•9 years ago
|
||
Comment 3•9 years ago
|
||
Jan-Ivar - where does this stand? Is setConfiguration problematic?
Flags: needinfo?(jib)
Assignee | ||
Comment 4•9 years ago
|
||
Aside from some unknowns [1] in the spec, this seems straight forward, since it looks like an ICE restart (Bug 906986) is needed for many of these settings to take effect, which hopefully rules out expectations that these things should be changeable in the middle of call setup.
[1] https://github.com/w3c/webrtc-pc/issues/373
Flags: needinfo?(jib)
Updated•9 years ago
|
Rank: 15 → 10
Assignee | ||
Comment 6•9 years ago
|
||
(Going through my priorities)
Re-reading comment 0, is the ask here merely to move the NotImplemented error from updateIce to setConfiguration and make getConfiguration return the config, or is it to actually implement setConfiguration?
If the latter, is there a pressing use-case (don't most people set config in constructor and never change it)?
Flags: needinfo?(martin.thomson)
Reporter | ||
Comment 7•9 years ago
|
||
updateIce is gone already. I think that reduces this bug to: implement getConfiguration.
Flags: needinfo?(martin.thomson)
Assignee | ||
Comment 8•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/38291/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/38291/
Attachment #8726878 -
Flags: review?(martin.thomson)
Assignee | ||
Updated•9 years ago
|
Summary: RTCPeerConnection.{getConfiguration|updateIce|setConfiguration} cleanup → Implement already-defined RTCPeerConnection.getConfiguration
Reporter | ||
Comment 9•9 years ago
|
||
Comment on attachment 8726878 [details]
MozReview Request: Bug 1181768 - Make already-defined pc.getConfiguration() work.
https://reviewboard.mozilla.org/r/38291/#review34961
::: dom/media/tests/mochitest/test_peerConnection_bug825703.html:25
(Diff revision 1)
> +var comparable = o => (typeof o != 'object' || !o)? o :
> + Object.keys(o).sort().reduce((co, key) => (co[key] = comparable(o[key]), co), {});
This doesn't preserve array-ness, which I suppose is OK (but it needs a comment to that effect in addition to the one explaining why this function exists). You could definiedly do better at making this clearer too; it's pretty tough reading this sort of code. The comma operator in particular is nasty. Please consider using {}.
::: dom/media/tests/mochitest/test_peerConnection_bug825703.html:88
(Diff revision 1)
> + var pc = new RTCPeerConnection(config);
> + is(JSON.stringify(comparable(pc.getConfiguration())),
> + JSON.stringify(comparable(config)), "getConfiguration");
What happens if I feed in:
```
{ watermelon: 'hat' }
```
In other words, please test unknown keys.
Attachment #8726878 -
Flags: review?(martin.thomson)
Assignee | ||
Comment 10•9 years ago
|
||
Thanks, will add comments.
(In reply to Martin Thomson [:mt:] from comment #9)
> ::: dom/media/tests/mochitest/test_peerConnection_bug825703.html:88
> (Diff revision 1)
> > + var pc = new RTCPeerConnection(config);
> > + is(JSON.stringify(comparable(pc.getConfiguration())),
> > + JSON.stringify(comparable(config)), "getConfiguration");
>
> What happens if I feed in:
> ```
> { watermelon: 'hat' }
> ```
> In other words, please test unknown keys.
This seems out of scope, since { watermelon: 'hat' } would never make it to PeerConnection.js - presumably the webidl binding code is sufficiently tested elsewhere - and redundant because of invariants: PeerConnection.js would see this default dictionary instead:
{"bundlePolicy":"balanced","iceTransportPolicy":"all","peerIdentity":null}
which would go through the same code path as the existing getConfiguration test.
Assignee | ||
Comment 11•9 years ago
|
||
https://reviewboard.mozilla.org/r/38291/#review34961
> What happens if I feed in:
> ```
> { watermelon: 'hat' }
> ```
> In other words, please test unknown keys.
replied in comment 10.
Assignee | ||
Comment 12•9 years ago
|
||
Comment on attachment 8726878 [details]
MozReview Request: Bug 1181768 - Make already-defined pc.getConfiguration() work.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38291/diff/1-2/
Attachment #8726878 -
Flags: review?(martin.thomson)
Reporter | ||
Comment 13•9 years ago
|
||
Comment on attachment 8726878 [details]
MozReview Request: Bug 1181768 - Make already-defined pc.getConfiguration() work.
https://reviewboard.mozilla.org/r/38291/#review34969
Oops, I did mean to give you an r+ on the last one. Here. And you are right about the default dictionary state.
maybe rename 'comparable' to 'toComparable', because 'comparable' implies to me 'isComparable'.
Attachment #8726878 -
Flags: review?(martin.thomson) → review+
Assignee | ||
Comment 14•9 years ago
|
||
Comment on attachment 8726878 [details]
MozReview Request: Bug 1181768 - Make already-defined pc.getConfiguration() work.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38291/diff/2-3/
Comment 15•9 years ago
|
||
Comment 16•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•