private void StopRecordResponse(ImRecordStopResp data) { if (!string.IsNullOrEmpty(data.strfilepath)) { recordPath = data.strfilepath; labelText = "停止录音返回:" + recordPath; Debug.Log("停止录音返回:" + recordPath); } }
private void StopRecordResponse(ImRecordStopResp data) { #if UNITY_EDITOR if (true) { return; } #endif mRecording = false; UIAPI.DebugLog("结束事件"); if (!string.IsNullOrEmpty(data.strfilepath)) { if (data.time < 0.5f) { return; } string recordPath = data.strfilepath; UIAPI.DebugLog("停止录音返回:" + recordPath); string fileId = DateTime.Now.ToFileTime().ToString(); YunVaImSDK.instance.UploadFileRequest(recordPath, fileId, (data1) => { if (data1.result == 0) { string recordUrlPath = data1.fileurl; SendMessage("DoStopFun", recordUrlPath); UIAPI.DebugLog("上传成功:" + recordUrlPath); return; } else { UIAPI.DebugLog("上传失败:" + data1.msg); } }); } SendMessage("DoStopFun", ""); }