W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > March 2017

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

From: Lennart Grahl via GitHub <sysbot+gh@w3.org>
Date: Thu, 16 Mar 2017 12:11:01 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-287038516-1489666259-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 9 October 2019 15:14:52 UTC