ios_to_code static method
Implementation
static KTVErrorCode ios_to_code($p_i.ByteRTCKTVErrorCode value) {
var $m = {
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeOK: KTVErrorCode.ok,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeAppidInValid:
KTVErrorCode.appid_invalid,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeParasInValid:
KTVErrorCode.paras_invalid,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeGetMusicFailed:
KTVErrorCode.get_music_failed,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeGetLyricFailed:
KTVErrorCode.get_lyric_failed,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeMusicTakedown:
KTVErrorCode.music_takedown,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeMusicDownload:
KTVErrorCode.music_download,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeMidiDownloadFailed:
KTVErrorCode.midi_download_failed,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeSystemBusy:
KTVErrorCode.system_busy,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeNetwork: KTVErrorCode.network,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeNotJoinRoom:
KTVErrorCode.not_join_room,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeParseData:
KTVErrorCode.parse_data,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeDownloading:
KTVErrorCode.downloading,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeInsufficientDiskSpace:
KTVErrorCode.insufficient_disk_space,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeMusicDecryptionFailed:
KTVErrorCode.music_decryption_failed,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeFileRenameFailed:
KTVErrorCode.file_rename_failed,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeDownloadTimeOut:
KTVErrorCode.download_timeout,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeClearCacheFailed:
KTVErrorCode.clear_cache_failed,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeDownloadCanceled:
KTVErrorCode.download_canceled,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeDownload:
KTVErrorCode.download,
$p_i.ByteRTCKTVErrorCode.ByteRTCKTVErrorCodeInternal:
KTVErrorCode.ByteRTCKTVErrorCodeInternal,
};
if (!($m.containsKey(value))) {
throw Exception("invalid value:" + value.toString());
}
// @ts-ignore
return $m[value] as KTVErrorCode;
}