- From: Stephen McGruer via GitHub <sysbot+gh@w3.org>
- Date: Thu, 02 Jul 2020 16:45:45 +0000
- To: public-webrtc-logs@w3.org
stephenmcgruer has just created a new issue for https://github.com/w3c/webrtc-ice:
== IDL errors in spec ==
This spec was recently imported into WPT (https://github.com/web-platform-tests/wpt/pull/24229), revealing at least two errors:
1. The `RTCIceCandidateInit` dictionary has no required members, and so should be optional in `addRemoteCandidate`:
```
Validation error at line 23 in webrtc-ice, inside `argument remoteCandidate`: void addRemoteCandidate (RTCIceCandidateInit remoteCandidate); ^ Dictionary argument must be optional if it has no required fields Validation error at line 428 in webrtc, inside `dictionary RTCIceParameters`: dictionary RTCIceParameters { ^ The name "RTCIceParameters" of type "dictionary" was already seen
Error: Validation error at line 23 in webrtc-ice, inside `argument remoteCandidate`:
void addRemoteCandidate (RTCIceCandidateInit remoteCandidate);
^ Dictionary argument must be optional if it has no required fields
```
2. The `RTCIceParameters` dictionary already exists, so cannot be redeclared:
```
Validation error at line 428 in webrtc, inside `dictionary RTCIceParameters`:
dictionary RTCIceParameters {
^ The name "RTCIceParameters" of type "dictionary" was already seen
at Test.<anonymous> (https://web-platform.test:8443/resources/idlharness.js:3494:31)
at Test.step (https://web-platform.test:8443/resources/testharness.js:1977:25)
at test (https://web-platform.test:8443/resources/testharness.js:535:30)
at https://web-platform.test:8443/resources/idlharness.js:3489:17
```
The former can be easily fixed by changing `addRemoteCandidate`'s signature to:
`void addRemoteCandidate (optional RTCIceCandidateInit remoteCandidate = {});`
The latter is a little trickier to fix, as it seems that this spec also makes the `usernameFragment` and `password` members of the `RTCIceParameters` required (previously optional). This could be either fixed by making them required in the base webrtc spec (and then using a `partial dictionary` to add the new `iceLite` member), or one could use a different dictionary altogether.
Please view or discuss this issue at https://github.com/w3c/webrtc-ice/issues/35 using your GitHub account
Received on Thursday, 2 July 2020 16:45:48 UTC