code_to_ios static method

ByteRTCKTVErrorCode code_to_ios(
  1. KTVErrorCode value
)

Implementation

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