parseIceConnectionStateChange method

String parseIceConnectionStateChange(
  1. RTCIceConnectionState iceConnectionState
)

Parses the RTCIceConnectionState to a human-readable string.

Implementation

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