lib/PeerConnection.js
function addLocalIceCandidate(event) {
        if (event && event.candidate) {
            // Add the ICE candidate only if we haven't already seen it
            var serializedCandidate = JSON.stringify(event.candidate);
            if (!storedIceCandidates.hasOwnProperty(serializedCandidate)) {
                storedIceCandidates[serializedCandidate] = true;
                localIceCandidates.push(event.candidate);
            }
        }

        // Emit an iceCandidates event containing all the candidates
        // gathered since the last event if we are emitting
        if (emittingIceCandidates && localIceCandidates.length > 0) {
            self.emit("iceCandidates", localIceCandidates);
            localIceCandidates = [];
        }
    }
function addLocalIceCandidate(event) {
        if (event && event.candidate) {
            // Add the ICE candidate only if we haven't already seen it
            var serializedCandidate = JSON.stringify(event.candidate);
            if (!storedIceCandidates.hasOwnProperty(serializedCandidate)) {
                storedIceCandidates[serializedCandidate] = true;
                localIceCandidates.push(event.candidate);
            }
        }

        // Emit an iceCandidates event containing all the candidates
        // gathered since the last event if we are emitting
        if (emittingIceCandidates && localIceCandidates.length > 0) {
            self.emit("iceCandidates", localIceCandidates);
            localIceCandidates = [];
        }
    }
function addLocalIceCandidate ( event ) { if ( event && event . candidate ) { // Add the ICE candidate only if we haven't already seen it var serializedCandidate = JSON . stringify ( event . candidate ) ; if ( ! storedIceCandidates . hasOwnProperty ( serializedCandidate ) ) { storedIceCandidates [ serializedCandidate ] = true ; localIceCandidates . push ( event . candidate ) ; } } // Emit an iceCandidates event containing all the candidates // gathered since the last event if we are emitting if ( emittingIceCandidates && localIceCandidates . length > 0 ) { self . emit ( "iceCandidates" , localIceCandidates ) ; localIceCandidates = [ ] ; } }
An ICE candidate was received

@param event
An ICE candidate was received