From 35a1f11de802c78b89460c696ffbe8b1c8346a39 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 08 七月 2021 16:22:51 +0800
Subject: [PATCH] 2021-07-08 1.增加猫眼推送对接

---
 HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs |   90 ++++++++++++++++++++++++++++++++-------------
 1 files changed, 64 insertions(+), 26 deletions(-)

diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
index b6ad254..19a9398 100644
--- a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -4,6 +4,7 @@
 using System.Threading;
 using System.Collections.Generic;
 using HDL_ON.UI.UI2.PersonalCenter.PirDevice;
+using HDL_ON.Entity;
 
 #if __IOS__
 using Shared.IOS.ESVideoOnSDK;
@@ -66,7 +67,7 @@
             int.TryParse(mESVideoInfo.roomno, out roomID);
 
 #if __IOS__
-            if (interphoneType == "IMOUVISIAL")
+            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
                 //涔愭鍙瀵硅
                 //1.鍒濆鍖朙COpenSDK_Api
@@ -95,7 +96,7 @@
             }
 #else
             Intent intent = null;
-            if (interphoneType == "IMOUVISIAL")
+            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
                 intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
             }
@@ -136,7 +137,7 @@
             int roomID = 0;
             int.TryParse(mESVideoInfo.roomno, out roomID);
 #if __IOS__
-            if (interphoneType == "IMOUVISIAL")
+            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
                 //涔愭鍙瀵硅
                 //1.鍒濆鍖朙COpenSDK_Api
@@ -152,6 +153,21 @@
                 vc.MLCCallDelegate = mOnLCCallDelegate;
                 //vc.MLCCallDelegate = new OnLCCallDelegate(this);
                 Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
+            }
+            else if (interphoneType == InterphoneType.EZVIZ.ToString())
+            {
+                //钀ょ煶鐚溂鍛煎彨
+                //鍒濆鍖栬悿鐭充簯SDK锛屼腑鏂囧浗鍐卥ey銆佽嫳鏂囨捣澶杒ey 寮�鍙戣�呰处鍙蜂娇鐢ㄥ簲鐢ㄥ寘鍚嶇敵璇风殑APPKEY锛屼笉鍚屽寘鍚嶅簲鐢ㄩ渶閰嶇疆涓嶅悓鐨凙PPKEY
+                EZSDK.IOS.EZSDK.InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
+                //1.璁剧疆鎵�闇�娌充笢鐨凙ccessToken鍜孯efreshToken銆佸煙鍚嶅湴鍧�
+                EZSDK.IOS.EZSDK.SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken);
+          
+                EZSDK.IOS.EZSDK.SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, mESVideoInfo.HomeId);
+                //2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK
+                EZSDK.IOS.EZSDK.SetEZAccessToken(mESVideoInfo.Lc_AccessToken);
+                //3.鎵撳紑瑙嗛鎾斁椤甸潰
+                EZSDK.IOS.EZSDK.PlayWithDeviceSerial(mESVideoInfo.DeviceSerial);
+
             }
             else
             {
@@ -170,9 +186,12 @@
             #region
 
             Intent intent = null;
-            if (interphoneType == "IMOUVISIAL")
+            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
                 intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
+            } else if (interphoneType == InterphoneType.EZVIZ.ToString())
+            {
+                //钀ょ煶鐚溂鍛煎彨澶勭悊
             }
             else
             {
@@ -598,31 +617,33 @@
         }
 
         #endregion
+
+       
 #endif
 
-        /// <summary>
-        /// 娴嬭瘯鏂规硶
-        /// </summary>
-        /// <param name="isMonitor"></param>
-        public void Test(bool isMonitor = true)
-        {
-            ESVideoInfo eSVideoInfo = new ESVideoInfo()
-            {
-                DeviceName = "瀹ゅ鏈�88",
-                ESVideoUUID = "JJY000019VPLLF",
+        ///// <summary>
+        ///// 娴嬭瘯鏂规硶
+        ///// </summary>
+        ///// <param name="isMonitor"></param>
+        //public void Test(bool isMonitor = true)
+        //{
+        //    ESVideoInfo eSVideoInfo = new ESVideoInfo()
+        //    {
+        //        DeviceName = "瀹ゅ鏈�88",
+        //        ESVideoUUID = "JJY000019VPLLF",
 
-            };
-            if (isMonitor)
-            {
-                ShowESVideoMonitor(eSVideoInfo, "");
-            }
-            else
-            {
-                eSVideoInfo.callId = "88888";
-                ShowESvideoVideoIntercom(eSVideoInfo, "");
-            }
+        //    };
+        //    if (isMonitor)
+        //    {
+        //        ShowESVideoMonitor(eSVideoInfo, "");
+        //    }
+        //    else
+        //    {
+        //        eSVideoInfo.callId = "88888";
+        //        ShowESvideoVideoIntercom(eSVideoInfo, "");
+        //    }
 
-        }
+        //}
     }
 
     /// <summary>
@@ -667,9 +688,9 @@
 
 
         //========================澶у崕==========================
-
         /// <summary>
         /// 璐﹀彿accessToken
+        /// 钀ょ煶瀛愯处鍙稵oken涔熷叡鐢ㄨ繖涓瓧娈�
         /// </summary>
         public string Lc_AccessToken = string.Empty;
 
@@ -692,6 +713,17 @@
         /// 璐﹀彿鏍囪锛�0鍥藉唴锛�1鍥藉锛涘浗鍐呭浗澶栬闂兘鍦板潃涓嶄竴鏍�
         /// </summary>
         public int Lc_Location = 0;
+
+        //========================钀ょ煶浜戠尗鐪�==========================
+        /// <summary>
+        /// 浣忓畢Id
+        /// </summary>
+        public string HomeId = string.Empty;
+        /// <summary>
+        /// 璁惧搴忓垪鍙�
+        /// </summary>
+        public string DeviceSerial = string.Empty;
+
 
     }
 
@@ -728,5 +760,11 @@
         /// 澶у崕鍙瀵硅骞冲彴
         /// </summary>
         IMOUVISIAL,
+        /// <summary>
+        /// 钀ょ煶鐚溂鍛煎彨
+        /// </summary>
+        EZVIZ,
+
+
     }
 }

--
Gitblit v1.8.0