/// <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); XXGoldFlowerGameController mCtr = Global.Inst.GetController <XXGoldFlowerGameController>(); SendReceiveGameChat req = new SendReceiveGameChat(); req.fromSeatId = XXGoldFlowerGameModel.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) => { XXGoldFlowerGameController mCtr = Global.Inst.GetController <XXGoldFlowerGameController>(); SendReceiveGameChat req = new SendReceiveGameChat(); req.chatType = (int)eGameChatContentType.Face; req.faceIndex = index; req.fromSeatId = XXGoldFlowerGameModel.Inst.mMySeatId;; mCtr.SendGameChat(req); }); }