From c9cf816402cd7981315b658601a17ea1e1890f1e Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 27 十二月 2022 16:30:05 +0800 Subject: [PATCH] 备份 --- HDL_ON/Common/ApiUtlis.cs | 166 +++++++++++++++++++++++++++++-------------------------- 1 files changed, 87 insertions(+), 79 deletions(-) diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs index 0181540..7da5e6f 100644 --- a/HDL_ON/Common/ApiUtlis.cs +++ b/HDL_ON/Common/ApiUtlis.cs @@ -232,6 +232,93 @@ FunctionList.List.IniFunctionList(newFunction.savePath); MainPage.Log($"============璁惧============{iiii++}"); } + + + + + //===================璇诲彇鍙瀵硅鏁版嵁========================== + //鍒ゆ柇鏄惁鏈夊彲瑙嗗璁叉暟鎹紝鏈夊垯鏄剧ず鍙瀵硅icon + //var flVideoInfo = HttpRequest.CheckFlVideo(); + //if(flVideoInfo.Code == StateCode.SUCCESS) + //{ + // FunctionList.List.videoIntercom1111 = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.UI2.FuntionControlView.Video.VideoClouds>(flVideoInfo.Data.ToString()); + //} + + //======================鑾峰彇鍙瀵硅璁惧鍒楄〃==================== + bool isInterphoneType_HDL = false;//鏄惁涓篐DLLinphone鍙瀵硅 + bool isInterphoneType_FREEVIEW = false;//鏄惁涓哄叏瑙嗛�氬彲瑙嗗璁� + var videoInfo = VideoSend.GetVideoInfoList(); + if (videoInfo.Code == StateCode.SUCCESS) + { + string videoList = videoInfo.Data.ToString(); + FunctionList.List.videoIntercom = JsonConvert.DeserializeObject<List<UI.UI2.FuntionControlView.Video.Video>>(videoList); + + foreach (var video in FunctionList.List.videoIntercom) + { + if (video.interphoneType == InterphoneType.IMOUVISIAL.ToString()) + { + UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken; + } + else if (video.interphoneType == InterphoneType.HDL.ToString()) + { + isInterphoneType_HDL = true; + DB_ResidenceData.Instance.SupportFacePass = true; + DB_ResidenceData.Instance.SaveResidenceData(); + + Entity.DB_ResidenceData.Instance.SupportFVDevice = true; + } + else if (video.interphoneType == InterphoneType.FREEVIEW.ToString()) + { + //涓哄叏瑙嗛�氬彲瑙嗗璁� + DB_ResidenceData.Instance.SupportFacePass = true; + Entity.DB_ResidenceData.Instance.SupportVisitorManage = true; + Entity.DB_ResidenceData.Instance.SupportFVDevice = true; + + //isInterphoneType_HDL = true; + isInterphoneType_FREEVIEW = true; + + } + } + } + + //======================鑾峰彇Sip璐﹀彿骞朵笖鍒濆鍖朣DK鍙瀵硅璁惧鍒楄〃==================== + //濡傛灉妫�娴嬬嚎绋嬫病鍚姩锛屾墠缁х画涓嬮潰鎿嶄綔 鍥犱负App鏈夊彲鑳藉垰鍚姩椹笂鏀跺埌鎺ㄩ�佷簡锛岀劧鍚庢墠鎵ц鍒拌繖閲� + if (HDLLinphone.Current.CheckIncomingCallThreadIsNull()) + { + //褰撳墠浣忓畢鏄疕DL鍙瀵硅绫诲瀷鐨勮澶� + if (isInterphoneType_HDL) + { + //HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK + HDLCallVideoInfo callVideoInfo = new HDLCallVideoInfo(); + callVideoInfo.HomeId = DB_ResidenceData.Instance.CurrentRegion.id; + callVideoInfo.InterphoneType = InterphoneType.HDL.ToString(); + HDLLinphone.Current.GetHDLSipInfoAndInitSDK(callVideoInfo); + } + else if (isInterphoneType_FREEVIEW) + { + //HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK + HDLCallVideoInfo callVideoInfo = new HDLCallVideoInfo(); + callVideoInfo.HomeId = DB_ResidenceData.Instance.CurrentRegion.id; + callVideoInfo.InterphoneType = InterphoneType.FREEVIEW.ToString(); + HDLLinphone.Current.GetHDLSipInfoAndInitSDK(callVideoInfo); + } + else + { + Utlis.WriteLine("褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅,閫�鍑虹櫥褰曟墍鏈夎处鍙�"); + //褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅 + HDLLinphone.Current.LogoutAllAccount(); + } + } + + //======================鐧诲綍鍏ㄨ閫�==================== + if (isInterphoneType_FREEVIEW) + { +#if __IOS__ + //鐧诲綍鍏ㄨ閫� + Shared.IOS.HDLFVSDK.Video.Init("", DB_ResidenceData.Instance.CurrentRegion.id); +#endif + } + } else { @@ -319,85 +406,6 @@ Logic.LogicList.Clear();//涓婚〉涓嬫媺寮哄埗鍒锋柊鑷姩鍖栧垪琛� //UI.UI2.Intelligence.Automation.MainView.GetLogicList(); - //===================璇诲彇鍙瀵硅鏁版嵁========================== - //鍒ゆ柇鏄惁鏈夊彲瑙嗗璁叉暟鎹紝鏈夊垯鏄剧ず鍙瀵硅icon - //var flVideoInfo = HttpRequest.CheckFlVideo(); - //if(flVideoInfo.Code == StateCode.SUCCESS) - //{ - // FunctionList.List.videoIntercom1111 = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.UI2.FuntionControlView.Video.VideoClouds>(flVideoInfo.Data.ToString()); - //} - - //======================鑾峰彇鍙瀵硅璁惧鍒楄〃==================== - bool isInterphoneType_HDL = false;//鏄惁涓篐DLLinphone鍙瀵硅 - bool isInterphoneType_FREEVIEW = false;//鏄惁涓哄叏瑙嗛�氬彲瑙嗗璁� - var videoInfo = VideoSend.GetVideoInfoList(); - if (videoInfo.Code == StateCode.SUCCESS) - { - string videoList = videoInfo.Data.ToString(); - FunctionList.List.videoIntercom = JsonConvert.DeserializeObject<List<UI.UI2.FuntionControlView.Video.Video>>(videoList); - - foreach (var video in FunctionList.List.videoIntercom) - { - if (video.interphoneType == InterphoneType.IMOUVISIAL.ToString()) - { - UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken; - } else if (video.interphoneType == InterphoneType.HDL.ToString()) { - isInterphoneType_HDL = true; - DB_ResidenceData.Instance.SupportFacePass = true; - DB_ResidenceData.Instance.SaveResidenceData(); - - Entity.DB_ResidenceData.Instance.SupportFVDevice = true; - } - else if (video.interphoneType == InterphoneType.FREEVIEW.ToString()) - { - //涓哄叏瑙嗛�氬彲瑙嗗璁� - DB_ResidenceData.Instance.SupportFacePass = true; - Entity.DB_ResidenceData.Instance.SupportVisitorManage = true; - Entity.DB_ResidenceData.Instance.SupportFVDevice = true; - - //isInterphoneType_HDL = true; - isInterphoneType_FREEVIEW = true; - - } - } - } - - //======================鑾峰彇Sip璐﹀彿骞朵笖鍒濆鍖朣DK鍙瀵硅璁惧鍒楄〃==================== - //濡傛灉妫�娴嬬嚎绋嬫病鍚姩锛屾墠缁х画涓嬮潰鎿嶄綔 鍥犱负App鏈夊彲鑳藉垰鍚姩椹笂鏀跺埌鎺ㄩ�佷簡锛岀劧鍚庢墠鎵ц鍒拌繖閲� - if (HDLLinphone.Current.CheckIncomingCallThreadIsNull()) { - //褰撳墠浣忓畢鏄疕DL鍙瀵硅绫诲瀷鐨勮澶� - if (isInterphoneType_HDL) - { - //HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK - HDLCallVideoInfo callVideoInfo = new HDLCallVideoInfo(); - callVideoInfo.HomeId = DB_ResidenceData.Instance.CurrentRegion.id; - callVideoInfo.InterphoneType = InterphoneType.HDL.ToString(); - HDLLinphone.Current.GetHDLSipInfoAndInitSDK(callVideoInfo); - } - else if (isInterphoneType_FREEVIEW) - { - //HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK - HDLCallVideoInfo callVideoInfo = new HDLCallVideoInfo(); - callVideoInfo.HomeId = DB_ResidenceData.Instance.CurrentRegion.id; - callVideoInfo.InterphoneType = InterphoneType.FREEVIEW.ToString(); - HDLLinphone.Current.GetHDLSipInfoAndInitSDK(callVideoInfo); - } - else - { - Utlis.WriteLine("褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅,閫�鍑虹櫥褰曟墍鏈夎处鍙�"); - //褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅 - HDLLinphone.Current.LogoutAllAccount(); - } - } - - //======================鐧诲綍鍏ㄨ閫�==================== - if (isInterphoneType_FREEVIEW) - { -#if __IOS__ - //鐧诲綍鍏ㄨ閫� - Shared.IOS.HDLFVSDK.Video.Init("", DB_ResidenceData.Instance.CurrentRegion.id); -#endif - } //======================瀹夐槻==================== -- Gitblit v1.8.0