Example #1
0
    private void SetTime()
    {
        int second = ChatTalkTipUIView.GetSecond();
        int num    = 60 - second;

        if (num > 10)
        {
            this.m_lblTimeTip.set_text(string.Empty);
        }
        else
        {
            this.m_lblTimeTip.set_text(TextColorMgr.GetColorByID(num + "s", 1000007));
        }
        if (num <= 0 && ChatUIViewModel.Instance != null)
        {
            ChatUIViewModel.Instance.SendMessageOfVoice();
        }
    }
Example #2
0
    private void OnRecordFinished()
    {
        Debug.Log("OnRecordFinished");
        byte[] speech = VoiceSDKManager.Instance.GetSpeech();
        if (speech == null)
        {
            UIManagerControl.Instance.ShowToastText("录音数据获取失败");
            return;
        }
        Debug.Log("***record length = " + speech.Length);
        int second = ChatTalkTipUIView.GetSecond();

        if (second < 1)
        {
            UIManagerControl.Instance.ShowToastText("录音时间过短");
            return;
        }
        this.JustSendMessageOfVoice(speech, second);
    }