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 13:35:09 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-287058186-1489671308-sysbot+gh@w3.org>
Sorry for the amount of edits but I am very confused by the current spec:

1. I still don't understand why the `onicecandidate` returns `null` to indicate the end of candidates and not `{ candidate: '', sdpMid: null, sdpMLineIndex: null }`? Sure, it will break backwards compatibility (to what as you already said no one implemented it?) but...
2. It also breaks forward compatibility towards `addIceCandidate` as the method allows `candidate` to be `null` but the description does not handle that case.

If 1 would be addressed and changed to `{ candidate: '', sdpMid: null, sdpMLineIndex: null }`, we could solve 2 backwards **and** forward compatibility by adding the following to the `addIceCandidate` method description after `4.2`:

> 3. If *candidate* is `null`, handle *candidate* as if it were `{ candidate: '', sdpMid: null, sdpMLineIndex: null }`.

What do you think? And again, sorry for the heavy editing.

GitHub Notification of comment by lgrahl
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1077#issuecomment-287058186 using your GitHub account
Received on Thursday, 16 March 2017 13:35:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:21:29 UTC