Esempio n. 1
0
        private void SendVoiceHandler(SendVoiceC2S chat)
        {
            var pushChat = new PushVoiceS2C();

            pushChat.senderUserId = playerInfoProxy.UserInfo.UserID;
            pushChat.content      = chat.content;
            pushChat.flag         = chat.flag;
            NetMgr.Instance.OnClientReceiveBuff(MsgNoS2C.PUSH_VOICE.GetHashCode(), 0, pushChat);
        }
Esempio n. 2
0
    /// <summary>
    /// 录音完成回调
    /// </summary>
    /// <param name="flag"></param>
    /// <param name="data"></param>
    private void SendAudioToServer(int flag, byte[] data)
    {
        if (flag == 1)
        {
            SendNotification(NotificationConstant.MEDI_BATTLEVIEW_HIDENRECORDING);
        }
        var sendVoiceC2S = new SendVoiceC2S();

        sendVoiceC2S.flag    = flag;
        sendVoiceC2S.content = data;
        NetMgr.Instance.SendBuff(SocketType.BATTLE, MsgNoC2S.SEND_VOICE_C2S.GetHashCode(), 0, sendVoiceC2S);
        battleProxy.perSendChatTime = gameMgrProxy.systemTime;
    }
Esempio n. 3
0
    /// <summary>
    /// 录音完成回调
    /// </summary>
    /// <param name="flag"></param>
    /// <param name="data"></param>
    private void SendAudioToServer(int flag, byte[] data)
    {
        if (flag == 1)
        {
            SendNotification(NotificationConstant.MEDI_BATTLEVIEW_HIDENRECORDING);
        }
        var sendVoiceC2S = new SendVoiceC2S();

        sendVoiceC2S.flag    = flag;
        sendVoiceC2S.content = data;
        NetMgr.Instance.SendBuff(SocketType.BATTLE, MsgNoC2S.C2S_ROOM_VOICE_CHAT.GetHashCode(), 0, sendVoiceC2S, true);
        battleProxy.perSendChatTime = gameMgrProxy.systemTime;
        RecorderSystem.GetAudioPacket(playerInfoProxy.userID, flag, data);
    }