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

@alvestrand Do you know, if Chrome provides any other legacy functionallity for end-of-candidates?

@jan-ivar I still wonder about the spec (see my previous previous comment). 

Let's start with the eventhanlder `onicecandidate` event. It is fired, when a *new RTCIceCandidate is made available to the script.*. Looking into the debug console, all ICE candidates objects are of type `RTCIceCandidate` (not plain JS objects):

![bildschirmfoto vom 2018-08-03 10 34 25](https://user-images.githubusercontent.com/750793/43633235-ec4a815e-9708-11e8-95ad-fbc0eae28daa.png)


Looking into the spec, you write:

```javascript
Promise<void> addIceCandidate((RTCIceCandidateInit or RTCIceCandidate) candidate);
```

The Promise expeteds an `RTCIceCandidate`. So, why is `RTCIceCandidate` now plain JS object `{candidate:'...'}` and not `new RTCIceCandidate({candidate:'...'})` (as thrown by the  `onicecandidate` event)?

I also added the end-of-candidates example (2) to MDN. Thus we have the correct version documented there as well.

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

Received on Friday, 3 August 2018 08:36:38 UTC