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

@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