code_to_ios static method
Implementation
static $p_i.ByteRTCWarningCode code_to_ios(WarningCode value) {
var $m = {
WarningCode.publish_stream_failed:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodePublishStreamFailed,
WarningCode.subscribe_stream_failed_404:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeSubscribeStreamFailed404,
WarningCode.subscribe_stream_failed_5xx:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeSubscribeStreamFailed5xx,
WarningCode.send_custom_message:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeSendCustomMessage,
WarningCode.receive_user_notify_stop:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeCodeUserNotifyStop,
WarningCode.user_in_publish:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeUserInPublish,
WarningCode.invalid_canvas_handle:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeInvalidCanvasHandle,
WarningCode.no_camera_permission:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeNoCameraPermission,
WarningCode.invalid_sami_app_key_or_token:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeInvaildSamiAppkeyORToken,
WarningCode.invalid_sami_resource_path:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeInvaildSamiResourcePath,
WarningCode.load_sami_library_failed:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeLoadSamiLibraryFailed,
WarningCode.invalid_sami_effect_type:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeInvaildSamiEffectType,
WarningCode.in_echo_test_mode:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeInEchoTestMode,
WarningCode.ios_room_already_exist:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeRoomAlreadyExist,
WarningCode.no_microphone_permission:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeNoMicrophonePermission,
WarningCode.audio_device_manager_recording_start_fail: $p_i
.ByteRTCWarningCode
.ByteRTCWarningCodeAudioDeviceManagerRecordingStartFail,
WarningCode.audio_device_manager_playout_start_fail: $p_i
.ByteRTCWarningCode
.ByteRTCWarningCodeAudioDeviceManagerPlayoutStartFail,
WarningCode.no_recording_device:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeNoRecordingDevice,
WarningCode.no_playout_device:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeNoPlayoutDevice,
WarningCode.recording_silence:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeRecordingSilence,
WarningCode.set_screen_audio_source_type_failed:
$p_i.ByteRTCWarningCode.ByteRTCWarningSetScreenAudioSourceTypeFailed,
WarningCode.set_screen_audio_stream_index_failed:
$p_i.ByteRTCWarningCode.ByteRTCWarningSetScreenAudioStreamIndexFailed,
WarningCode.invalid_voice_pitch:
$p_i.ByteRTCWarningCode.ByteRTCWarningInvalidVoicePitch,
WarningCode.invalid_call_for_ext_audio:
$p_i.ByteRTCWarningCode.ByteRTCWarningInvalidCallForExtAudio,
WarningCode.media_device_operation_denied:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeMediaDeviceOperationDennied,
WarningCode.ByteRTCWarningCodeInvokeError:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeInvokeError,
WarningCode.ByteRTCWarningCodeInvalidExpectMediaServerAddress: $p_i
.ByteRTCWarningCode.ByteRTCWarningCodeInvalidExpectMediaServerAddress,
WarningCode.ByteRTCWarningCodePublishStreamForbidden:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodePublishStreamForbidden,
WarningCode.ByteRTCWarningCodeSubscribeStreamForbiden:
$p_i.ByteRTCWarningCode.ByteRTCWarningCodeSubscribeStreamForbiden,
WarningCode.unknown: $p_i.ByteRTCWarningCode.unknown,
};
if (!($m.containsKey(value))) {
throw Exception("ios not support:" + value.toString());
}
// @ts-ignore
return $m[value] as $p_i.ByteRTCWarningCode;
}