private void UpdateIndicator(SIPSorcery.Net.RTCIceConnectionState state) { switch (state) { case SIPSorcery.Net.RTCIceConnectionState.closed: case SIPSorcery.Net.RTCIceConnectionState.failed: case SIPSorcery.Net.RTCIceConnectionState.disconnected: indicator.enabled = true; indicator.color = failedColor; break; case SIPSorcery.Net.RTCIceConnectionState.@new: case SIPSorcery.Net.RTCIceConnectionState.checking: indicator.enabled = true; indicator.color = attemptingColor; break; case SIPSorcery.Net.RTCIceConnectionState.connected: default: indicator.enabled = false; break; } }
private void PeerConnection_OnIceConnectionStateChanged(SIPSorcery.Net.RTCIceConnectionState state) { UpdateIndicator(state); }