Re: [webrtc-pc] Candidate from onicecandidate event and addIceCandidate are incompatible

Without knowledge of the history why *all gathering done* fires a `null` candidate, implementing `addIceCandidate` is error-prone. Users will expect that everything that comes out from the `onicecandidate` event can be thrown into `addIceCandidate` without having to check anything. But currently there is no indication on what's supposed to happen in case the `candidate` argument is `null`.

I propose a simple solution after `4.2` in the `addIceCandidate` method:
> 3. If *candidate* is `null`, return *p* immediately and resolve *p* with `undefined`.

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

Received on Thursday, 16 March 2017 12:11:07 UTC