degradationPreferenceforString function
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;
}