degradationPreferenceforString function

RTCDegradationPreference degradationPreferenceforString(
  1. String? degradation
)

Implementation

RTCDegradationPreference degradationPreferenceforString(String? degradation) {
  switch (degradation) {
    case 'disabled':
      return RTCDegradationPreference.DISABLED;
    case 'maintain-framerate':
      return RTCDegradationPreference.MAINTAIN_FRAMERATE;
    case 'maintain-resolution':
      return RTCDegradationPreference.MAINTAIN_RESOLUTION;
    case 'balanced':
      return RTCDegradationPreference.BALANCED;
  }
  return RTCDegradationPreference.BALANCED;
}