/// <summary> /// 语音聊天抬起 /// </summary> public void OnVoiceRelase() { mVoceRecordShow.gameObject.SetActive(false); #if YYVOICE uint mCurRecordTime = 0; YunVaImSDK.instance.RecordStopRequest((data1) => { mCurRecordTime = data1.time; SQDebug.Log("停止录音返回:" + data1.strfilepath); }, (data2) => { SQDebug.Log("上传返回:" + data2.fileurl); TenGameController mCtr = Global.Inst.GetController <TenGameController>(); SendReceiveGameChat req = new SendReceiveGameChat(); req.fromSeatId = TenModel.Inst.mMySeatId; req.chatType = (int)eGameChatContentType.Voice; req.content = data2.fileurl; req.voiceChatTime = (int)mCurRecordTime; mCtr.SendGameChat(req); }, (data3) => { SQDebug.Log("识别返回:" + data3.text); }); #endif }
/// <summary> /// 聊天表情点击 /// </summary> public void OnTxtChatClick() { GameChatView view = Global.Inst.GetController <GameChatController>().OpenWindow() as GameChatView; view.SetData((index) => { TenGameController mCtr = Global.Inst.GetController <TenGameController>(); SendReceiveGameChat req = new SendReceiveGameChat(); req.chatType = (int)eGameChatContentType.TexTVoice; req.faceIndex = index; req.fromSeatId = TenModel.Inst.mMySeatId;; mCtr.SendGameChat(req); }); }