Re: [webrtc-pc] How do I indicate the end of remote candidates?

@boldt I think you mean the *function* expects certain arguments. The promise is just the return value from the function, and has nothing to do with the input arguments to the function.

The function expects EITHER [RTCIceCandidate](http://w3c.github.io/webrtc-pc/#idl-def-rtcicecandidate) OR an [RTCIceCandidateInit](http://w3c.github.io/webrtc-pc/#idl-def-rtcicecandidateinit), a plain dictionary/JS object.

An `RTCIceCandidate` instance is valid input to a function expecting `RTCIceCandidateInit`, because they have the same members. E.g.
```js
let c1 = new RTCIceCandidate(new RTCIceCandidate({candidate: '...'}));
```
This is a common copy-constructor pattern in JS for data holder interfaces:
```js
let e = new Event("test2", new Event("test", {bubbles: true}));
console.log(e.bubbles); // true
```

Come to think of it, this means we can simplify the spec. I'll file an issue. Thanks!

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1952#issuecomment-410289502 using your GitHub account

Received on Friday, 3 August 2018 15:29:30 UTC