onIceCandidate method
Sends the onIceCandidate to the WebSocket server
Implementation
void onIceCandidate(RTCIceCandidate iceCandidate, String? endpointName) {
final Map<String, String> onIceCandidateParams = {
'candidate': iceCandidate.candidate!,
'sdpMid': iceCandidate.sdpMid!,
'sdpMLineIndex': iceCandidate.sdpMLineIndex.toString(),
};
if (endpointName != null) {
onIceCandidateParams['endpointName'] = endpointName;
}
idsOnIceCandidate.add(
sendJson(JsonConstants.onIceCandidateMethod, onIceCandidateParams));
}