private void someoneMute(string roomId, string guestId, bool isMute)
        {
            if (guestId == UserInfo.UserId)
            {
                callOMCS.Mute(isMute);
            }

            onSomeoneMute?.Invoke(roomId, guestId, isMute);
        }
Ejemplo n.º 2
0
        private void Receive(string info)
        {
            //分析信息
            Dictionary <string, string> receiveMessage = new Dictionary <string, string>();
            MessageContent messageContent;
            MessageType    messageType;

            receiveMessage = MessageTranslate.AnalyseInfo(info, out messageContent, out messageType);
            switch (messageType)
            {
            case MessageType.错误:
                break;

            case MessageType.响应:
                respondMessage = receiveMessage;
                if (waitingRespond)
                {
                    waitingRespond = false;    //得到响应 停止等待
                }
                else
                {
                    throw new Exception("未请求的响应到来");
                }
                break;

            case MessageType.通知:    //未封装的
                if (messageContent == MessageContent.静音自己)
                {
                    callOMCS.Mute(bool.Parse(respondMessage["是否静音"]));
                }
                else if (messageContent == MessageContent.某人退出答疑室)
                {
                    //
                }
                break;
            }
        }