瀏覽代碼

fix 0012431: 【实时诊断】参会人登录手机端收到呼叫进入会诊,此时手机端出现息屏,重新解除息屏,心跳没有超时会诊画面正常查看,其他端查看参会人画面 “摄像头画面外层包着网络异常蒙皮”

Jeremy 1 年之前
父節點
當前提交
88ab4c9a00
共有 2 個文件被更改,包括 7 次插入6 次删除
  1. 5 4
      LiveConsultationHeartRateManager.cs
  2. 2 2
      LiveConsultationService.cs

+ 5 - 4
LiveConsultationHeartRateManager.cs

@@ -22,11 +22,11 @@ namespace WingLiveConsultationService
         private int _leaveRoomTimes => EnvironmentConfigManager.GetParammeter<IntParameter>("LiveConsultation", "LeaveRoomTimes").Value;//10次间隔无心跳,离开房间
         private ConcurrentDictionary<string, LiveConsultationHeartRateDTO> _clientTokens = new ConcurrentDictionary<string, LiveConsultationHeartRateDTO>();
 
-        private Action<string, string, string> OnClientJoined;
+        private Action<string, string, string, bool> OnClientJoined;
         private Action<string, string, string> OnClientNetworkErr;
         private Action<string, string, string> OnClientLeave;
 
-        public LiveConsultationHeartRateManager(Action<string, string, string> handleClientJoined, Action<string, string, string> handleClientNetworkErr, Action<string, string, string> handleClientLeave)
+        public LiveConsultationHeartRateManager(Action<string, string, string, bool> handleClientJoined, Action<string, string, string> handleClientNetworkErr, Action<string, string, string> handleClientLeave)
         {
             OnClientJoined = handleClientJoined;
             OnClientNetworkErr = handleClientNetworkErr;
@@ -47,12 +47,13 @@ namespace WingLiveConsultationService
             _clientTokens.AddOrUpdate(uniqueId, (k) =>
             {
                 var v = new LiveConsultationHeartRateDTO(token, clientId, name, consultationCode);
-                OnClientJoined.Invoke(consultationCode, v.ClientId, name);
+                OnClientJoined.Invoke(consultationCode, v.ClientId, name, false);
                 return v;
             }, (k, v) =>
             {
+                var sendMessage = v.LivingTimes >= _networkErrTimes;
                 v.Activate();
-                OnClientJoined.Invoke(consultationCode, v.ClientId, name);
+                OnClientJoined.Invoke(consultationCode, v.ClientId, name, sendMessage);
                 return v;
             });
         }

+ 2 - 2
LiveConsultationService.cs

@@ -1159,7 +1159,7 @@ namespace WingLiveConsultationService
             return res;
         }
 
-        private async void HandleClientJoined(string roomId, string clientId, string name)
+        private async void HandleClientJoined(string roomId, string clientId, string name, bool sendMessage)
         {
             try
             {
@@ -1172,7 +1172,7 @@ namespace WingLiveConsultationService
                 }
                 if (room != null && liveMember != null)
                 {
-                    if (liveMember.Status == LiveMemberStatus.Accepted || liveMember.Status == LiveMemberStatus.Left)
+                    if (liveMember.Status == LiveMemberStatus.Accepted || liveMember.Status == LiveMemberStatus.Left || sendMessage)
                     {
                         await _rtcService.HeartRateJoinedAsync(new HeartRateJoinRequest
                         {