gotIceCandidate method

void gotIceCandidate(
  1. RTCIceCandidate event
)

Implementation

void gotIceCandidate(RTCIceCandidate event) {
  if (event.candidate != null) {
    var data = json.encode({
      'ice': {
        'candidate': event.candidate,
        'sdpMLineIndex': event.sdpMLineIndex,
        'sdpMid': event.sdpMid,
      },
      'uuid': uuid
    });
    channel.sink.add(data);
  }
}