Re: [webrtc-pc] RTCIceCandidateInit has no required fields, so should probably be optional in addIceCandidate (#2125)

> addIceCandidate({candidate: ""}) is quite weird to me.

On purpose. Users aren't supposed to have to end candidates manually, just do:
```js
pc.onicecandidate = ({candidate}) => signaling.send({candidate});

signaling.onmessage = async ({data: {description, candidate}}) => {
  if (candidate) await pc.addIceCandidate(candidate);
  if (description) ...
}
```
and the browsers take care of the rest.

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

Received on Tuesday, 12 March 2019 23:16:15 UTC