client/webrtc.js
// delivers the ICE candidate to the remote peer through the signaling server. 

delivers the ICE candidate to the remote peer through the signaling server.
delivers the ICE candidate to the remote peer through the signaling server .
function gotIceCandidate(event, peerUuid) {
  if (event.candidate != null) {
    serverConnection.send(JSON.stringify({ 'ice': event.candidate, 'uuid': localUuid, 'dest': peerUuid , "time": time }));
    if (event && event.target && event.target.iceGatheringState === 'complete') {
      console.log('done gathering candidates - got iceGatheringState complete');
  } else if (event && event.candidate == null) {
      console.log('done gathering candidates - got null candidate');
  } else {
        console.log(event.target.iceGatheringState, event);   
  }
  }
}
function gotIceCandidate ( event , peerUuid ) { if ( event . candidate != null ) { serverConnection . send ( JSON . stringify ( { 'ice' : event . candidate , 'uuid' : localUuid , 'dest' : peerUuid , "time" : time } ) ) ; if ( event && event . target && event . target . iceGatheringState === 'complete' ) { console . log ( 'done gathering candidates - got iceGatheringState complete' ) ; } else if ( event && event . candidate == null ) { console . log ( 'done gathering candidates - got null candidate' ) ; } else { console . log ( event . target . iceGatheringState , event ) ; } } }
delivers the ICE candidate to the remote peer through the signaling server.
delivers the ICE candidate to the remote peer through the signaling server .
//messages to track the process of ice candidates exchange
