From a70dac4349c9bb78d7be5052f371136d840b2665 Mon Sep 17 00:00:00 2001
From: lss <lsc@hdlchina.com.cn>
Date: 星期四, 22 四月 2021 15:42:42 +0800
Subject: [PATCH] 2021-04-22 临时备份

---
 HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs |  102 ++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 81 insertions(+), 21 deletions(-)

diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
index 1466184..c0b6dcd 100644
--- a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -3,6 +3,7 @@
 using HDL_ON.DAL.Server;
 using System.Threading;
 using System.Collections.Generic;
+using HDL_ON.UI.UI2.PersonalCenter.PirDevice;
 
 #if __IOS__
 using Shared.IOS.ESVideoOnSDK;
@@ -57,7 +58,7 @@
         /// 鐩戞帶椤甸潰
         /// </summary>
         /// <param name="mESVideoInfo"></param>
-        public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo)
+        public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo, string interphoneType)
         {
 #if __IOS__
              int roomID = 0;
@@ -70,29 +71,43 @@
             vc.MESCallDelegate = new OnESCallDelegate(this);
             Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
 #else
+            Intent intent = null;
+            if (interphoneType == "IMOUVISIAL")
+            {
+                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
+            }
+            else
+            {
+                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
+            }
 
-            Intent intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
             intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);
             intent.PutExtra("uuid", mESVideoInfo.uuid);
             intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);
             intent.PutExtra("cmtID", mESVideoInfo.cmtID);
             intent.PutExtra("roomno", mESVideoInfo.roomno);
             intent.PutExtra("unitno", mESVideoInfo.unitno);
-            //intent.PutExtra("HomeID", mESVideoInfo.HomeID);
+            intent.PutExtra("HomeID", PirSend.HomeId);
             intent.PutExtra("callId", mESVideoInfo.callId);
             intent.PutExtra("Type", 0);
+
+            //=========涔愭==========
+            intent.PutExtra("AccessToken", mESVideoInfo.Lc_AccessToken);
+            intent.PutExtra("DeviceId", mESVideoInfo.Lc_DeviceId);
+            intent.PutExtra("Location", OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1);//濡傛灉鍩熷悕鍖呭惈china锛屽垯鏄浗鍐呰处鍙�);
+            intent.PutExtra("PlayToken", mESVideoInfo.Lc_PlayToken);
+            intent.PutExtra("Psk", mESVideoInfo.Lc_Psk);
+
             Shared.Application.Activity.StartActivity(intent);
 
 #endif
         }
 
-
-
         /// <summary>
         /// 琚懠鍙〉闈�
         /// </summary>
         /// <param name="mESVideoInfo"></param>
-        public void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo)
+        public void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo, string interphoneType)
         {
             this.esVideoInfo = mESVideoInfo;
 #if __IOS__
@@ -108,19 +123,38 @@
             vc.MESCallDelegate = mOnESCallDelegate;
             Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
 #else
+            #region
 
-            Intent intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
+            Intent intent = null;
+            if (interphoneType == "IMOUVISIAL")
+            {
+                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
+            }
+            else
+            {
+                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
+            }
+
             intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);
             intent.PutExtra("uuid", mESVideoInfo.uuid);
             intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);
             intent.PutExtra("cmtID", mESVideoInfo.cmtID);
             intent.PutExtra("roomno", mESVideoInfo.roomno);
             intent.PutExtra("unitno", mESVideoInfo.unitno);
-            //intent.PutExtra("HomeID", mESVideoInfo.HomeID);
+            intent.PutExtra("HomeID", PirSend.HomeId);
             intent.PutExtra("callId", mESVideoInfo.callId);
             intent.PutExtra("Type", 1);
+
+            //=========涔愭==========
+            intent.PutExtra("AccessToken", mESVideoInfo.Lc_AccessToken);
+            intent.PutExtra("DeviceId", mESVideoInfo.Lc_DeviceId);
+            intent.PutExtra("Location", OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1);//濡傛灉鍩熷悕鍖呭惈china锛屽垯鏄浗鍐呰处鍙�);
+            intent.PutExtra("PlayToken", mESVideoInfo.Lc_PlayToken);
+            intent.PutExtra("Psk", mESVideoInfo.Lc_Psk);
+
             Shared.Application.Activity.StartActivity(intent);
 
+            #endregion
 #endif
         }
 
@@ -186,7 +220,7 @@
                 }
                 else
                 {
-                    Utlis.WriteLine("POST 鎸傛柇澶辫触 code: "+ revertObj.Code);
+                    Utlis.WriteLine("POST 鎸傛柇澶辫触 code: " + revertObj.Code);
                 }
 
             })
@@ -260,6 +294,7 @@
         }
 
         DateTime UnlockDateTime = DateTime.MinValue;
+
         /// <summary>
         /// 寮�閿佹垚鍔�
         /// </summary>
@@ -270,9 +305,9 @@
             if (CheckESVideoInfoIsNullOrEmpty()) return;
 
             //3S鍐呬笉鍏佽瑙﹀彂绗簩娆�
-            if(UnlockDateTime.AddSeconds(3) > DateTime.Now)
+            if (UnlockDateTime.AddSeconds(3) > DateTime.Now)
             {
-               
+
                 Utlis.WriteLine("3S鍐呬笉鍏佽瑙﹀彂绗簩娆�");
                 //涓版灄SDKbug锛屽懠鍙殑鏃跺�欏紑閿佹垚鍔熶細鏈�2娆″洖璋冿紝
                 return;
@@ -300,10 +335,10 @@
             { IsBackground = false }.Start();
         }
 
-#endregion
+        #endregion
 
 #if __IOS__
-#region OnESCallDelegate
+        #region OnESCallDelegate
         /////// <summary>
         /////// OnESCallDelegate 缁ф壙鍝嶅簲浜嬩欢
         /////// </summary>
@@ -371,7 +406,7 @@
 
         }
 
-#endregion
+        #endregion
 #endif
 
         /// <summary>
@@ -384,23 +419,23 @@
             {
                 DeviceName = "瀹ゅ鏈�88",
                 ESVideoUUID = "JJY000019VPLLF",
-                 
+
             };
             if (isMonitor)
             {
-                ShowESVideoMonitor(eSVideoInfo);
+                ShowESVideoMonitor(eSVideoInfo, "");
             }
             else
             {
                 eSVideoInfo.callId = "88888";
-                ShowESvideoVideoIntercom(eSVideoInfo);
+                ShowESvideoVideoIntercom(eSVideoInfo, "");
             }
 
         }
     }
 
     /// <summary>
-    /// 
+    /// 鍙瀵硅鍙傛暟瀵硅薄锛堜粎鍦ㄦ渶鍚庝竴姝ヨ烦杞埌activity鏃舵墠璋冪敤,涓轰簡鍋氬吋瀹硅繖閲岄兘鏁版嵁鏈夌偣涔憋紝浠ュ悗鏈夋椂闂村啀鐞嗛『鎬濊矾浼樺寲锛�
     /// </summary>
     public class ESVideoInfo
     {
@@ -439,9 +474,34 @@
         /// </summary>
         public string callId = string.Empty;
 
+
+        //========================澶у崕==========================
+
+        /// <summary>
+        /// 璐﹀彿accessToken
+        /// </summary>
+        public string Lc_AccessToken = string.Empty;
+
+        /// <summary>
+        /// 璁惧搴忓垪鍙凤紝閫氳蹇呰瀛楁
+        /// </summary>
+        public string Lc_DeviceId = string.Empty;
+
+        /// <summary>
+        /// 澶囨敞锛燂紵锛�
+        /// </summary>
+        public string Lc_Psk = string.Empty;
+
+        /// <summary>
+        /// 棰勮鐢婚潰蹇呴』浣跨敤
+        /// </summary>
+        public string Lc_PlayToken = string.Empty;
+
+        /// <summary>
+        /// 璐﹀彿鏍囪锛�0鍥藉唴锛�1鍥藉锛涘浗鍐呭浗澶栬闂兘鍦板潃涓嶄竴鏍�
+        /// </summary>
+        public int Lc_Location = 0;
+
     }
-
-    
-
 
 }

--
Gitblit v1.8.0