W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > August 2018

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

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Tue, 28 Aug 2018 16:07:56 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-416645360-1535472475-sysbot+gh@w3.org>
@boldt Again, addIceCandidate does not take a string as argument.

>From this [spec note](http://w3c.github.io/webrtc-pc/#dfn-fire-an-ice-candidate-event), you'll see the following on `event.candidate` (given two real candidates):
- `{candidate: '...'}` (non empty string)
- `{candidate: '...'}` (non empty string)
- `{candidate: ''}` (empty string indicates end of generation of candidates)
- `null` (null indicates iceGatheringState is "complete")

Web developers are expected to opaquely serialize everything except `null` to `addIceCandidate()`:

- `addIceCandidate({candidate: '...'})` (non empty string)
- `addIceCandidate({candidate: '...'})` (non empty string)
- `addIceCandidate({candidate: ''})` (empty string)

... which completes the iceGatherningState.



-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1952#issuecomment-416645360 using your GitHub account
Received on Tuesday, 28 August 2018 16:08:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:22:05 UTC