iceConnectionStateForString function

RTCIceConnectionState iceConnectionStateForString(
  1. String state
)

Implementation

RTCIceConnectionState iceConnectionStateForString(String state) {
  switch (state) {
    case "new":
      return RTCIceConnectionState.RTCIceConnectionStateNew;
    case "checking":
      return RTCIceConnectionState.RTCIceConnectionStateChecking;
    case "connected":
      return RTCIceConnectionState.RTCIceConnectionStateConnected;
    case "completed":
      return RTCIceConnectionState.RTCIceConnectionStateCompleted;
    case "failed":
      return RTCIceConnectionState.RTCIceConnectionStateFailed;
    case "disconnected":
      return RTCIceConnectionState.RTCIceConnectionStateDisconnected;
    case "closed":
      return RTCIceConnectionState.RTCIceConnectionStateClosed;
    case "count":
      return RTCIceConnectionState.RTCIceConnectionStateCount;
  }
  return RTCIceConnectionState.RTCIceConnectionStateClosed;
}