peerConnectionStateForString function
Implementation
RTCPeerConnectionState peerConnectionStateForString(String? state) {
switch (state) {
case 'new':
return RTCPeerConnectionState.RTCPeerConnectionStateNew;
case 'connecting':
return RTCPeerConnectionState.RTCPeerConnectionStateConnecting;
case 'connected':
return RTCPeerConnectionState.RTCPeerConnectionStateConnected;
case 'closed':
return RTCPeerConnectionState.RTCPeerConnectionStateClosed;
case 'disconnected':
return RTCPeerConnectionState.RTCPeerConnectionStateDisconnected;
case 'failed':
return RTCPeerConnectionState.RTCPeerConnectionStateFailed;
}
return RTCPeerConnectionState.RTCPeerConnectionStateClosed;
}