signalingStateForString function

RTCSignalingState signalingStateForString(
  1. String? state
)

Implementation

RTCSignalingState signalingStateForString(String? state) {
  switch (state) {
    case 'stable':
      return RTCSignalingState.RTCSignalingStateStable;
    case 'have-local-offer':
      return RTCSignalingState.RTCSignalingStateHaveLocalOffer;
    case 'have-local-pranswer':
      return RTCSignalingState.RTCSignalingStateHaveLocalPrAnswer;
    case 'have-remote-offer':
      return RTCSignalingState.RTCSignalingStateHaveRemoteOffer;
    case 'have-remote-pranswer':
      return RTCSignalingState.RTCSignalingStateHaveRemotePrAnswer;
    case 'closed':
      return RTCSignalingState.RTCSignalingStateClosed;
  }
  return RTCSignalingState.RTCSignalingStateClosed;
}