Closed shimaore closed 10 years ago
I don't think this can work (currently even)... RTCPeerconnection emits 'endOfCandidates' when ice gathering is completed, not an empty candidate, see https://github.com/HenrikJoreteg/RTCPeerConnection/blob/master/rtcpeerconnection.js#L338
I'd rather have a non-trickle mode in rtcpeerconnection that only calls the createoffer-callback once gathering is done.
@fippo yup, my bad.
Regarding non-trickle mode, I implemented a gatherer using the npm sdp
module, I'll integrate that into a solution that relies on endOfCandidates
and post when that's ready.
This is required in some situations, for example when the signaling API requires a complete SDP instead of accepting ICE candidates as-you-go. If the completion event is dropped, the SDP is never sent out. I suggest to either send a different message (proposed here), which has the advantage of not breaking the existing API for this module, or to do it the WebRTC way: