From eda3fb873e59544ff36301b51e05aef64f87b0f9 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 27 八月 2021 13:21:21 +0800
Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into newBranch1

---
 HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs |  209 ++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 160 insertions(+), 49 deletions(-)

diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
index 19a9398..df8612f 100644
--- a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -71,6 +71,7 @@
             {
                 //涔愭鍙瀵硅
                 //1.鍒濆鍖朙COpenSDK_Api
+                LCApiKit.SharedInstance().IsChinaMainland = OnAppConfig.Instance.RequestHttpsHost.Contains("china");//濡傛灉鍩熷悕鍖呭惈china锛屽垯SDK 浣跨敤涔愭鐨勪腑鍥藉ぇ闄�(姝e紡)鍩熷悕
                 LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken);
                 LCApiKit.SharedInstance().CurrentDevicePlayToken = mESVideoInfo.Lc_PlayToken;
                 LCApiKit.SharedInstance().CurrentDeviceId = mESVideoInfo.Lc_DeviceId;
@@ -83,7 +84,7 @@
                 //vc.MLCCallDelegate = new OnLCCallDelegate(this);
                 Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
             }
-            else
+            else if(interphoneType == InterphoneType.FLVI.ToString())
             {
 
                 ESOnMonitorViewController vc = new ESOnMonitorViewController();
@@ -93,36 +94,73 @@
                 //vc.RoomName = mESVideoInfo.RoomName;
                 //vc.MESCallDelegate = new OnESCallDelegate(this);
                 Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
+            }else if (interphoneType == InterphoneType.HDL.ToString())
+            {
+                //HDLLinphone 鐙勮�愬厠
+                HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo);
+            }
+            else
+            {
+                HDLUtils.WriteLine("鏈鎺ワ紝涓嶆敮鎸佺洃瑙�");
             }
 #else
             Intent intent = null;
             if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
                 intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
+                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", 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);
+            }
+            else if (interphoneType == InterphoneType.FLVI.ToString())
+            {
+
+                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", 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);
+            }
+            else if (interphoneType == InterphoneType.HDL.ToString())
+            {
+                //HDLLinphone 鐙勮�愬厠
+                HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo);
             }
             else
             {
-                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
+                HDLUtils.WriteLine("鏈鎺ワ紝涓嶆敮鎸佺洃瑙�");
             }
 
-            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", 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
         }
@@ -141,6 +179,7 @@
             {
                 //涔愭鍙瀵硅
                 //1.鍒濆鍖朙COpenSDK_Api
+                LCApiKit.SharedInstance().IsChinaMainland = OnAppConfig.Instance.RequestHttpsHost.Contains("china");//濡傛灉鍩熷悕鍖呭惈china锛屽垯SDK 浣跨敤涔愭鐨勪腑鍥藉ぇ闄�(姝e紡)鍩熷悕
                 LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken);
                 //2021-05-18 鐩墠鎺ㄩ�佺殑PlayToken;鏈夐棶棰樹細瀵艰嚧SDK宕╂簝锛屾殏鏃朵笉浼�
                 //LCApiKit.SharedInstance().CurrentDevicePlayToken = mESVideoInfo.Lc_PlayToken;
@@ -158,18 +197,24 @@
             {
                 //钀ょ煶鐚溂鍛煎彨
                 //鍒濆鍖栬悿鐭充簯SDK锛屼腑鏂囧浗鍐卥ey銆佽嫳鏂囨捣澶杒ey 寮�鍙戣�呰处鍙蜂娇鐢ㄥ簲鐢ㄥ寘鍚嶇敵璇风殑APPKEY锛屼笉鍚屽寘鍚嶅簲鐢ㄩ渶閰嶇疆涓嶅悓鐨凙PPKEY
-                EZSDK.IOS.EZSDK.InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
+                EZSDK.IOS.EZSDK.SharedInstance().InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
                 //1.璁剧疆鎵�闇�娌充笢鐨凙ccessToken鍜孯efreshToken銆佸煙鍚嶅湴鍧�
-                EZSDK.IOS.EZSDK.SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken);
+                EZSDK.IOS.EZSDK.SharedInstance().SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken);
           
-                EZSDK.IOS.EZSDK.SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, mESVideoInfo.HomeId);
+                EZSDK.IOS.EZSDK.SharedInstance().SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, mESVideoInfo.HomeId);
                 //2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK
-                EZSDK.IOS.EZSDK.SetEZAccessToken(mESVideoInfo.Lc_AccessToken);
+                EZSDK.IOS.EZSDK.SharedInstance().SetEZAccessToken(mESVideoInfo.Lc_AccessToken);
                 //3.鎵撳紑瑙嗛鎾斁椤甸潰
-                EZSDK.IOS.EZSDK.PlayWithDeviceSerial(mESVideoInfo.DeviceSerial);
+                EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(mESVideoInfo.DeviceSerial);
 
             }
-            else
+            else if (interphoneType == InterphoneType.HDL.ToString())
+            {
+                //HDL Linphone 鐙勮�愬厠
+     
+
+            }
+            else if (interphoneType == InterphoneType.FLVI.ToString())
             {
 
                 ESOnIntercomViewController vc = new ESOnIntercomViewController();
@@ -181,41 +226,100 @@
                 mOnESCallDelegate = new OnESCallDelegate(this);
                 vc.MESCallDelegate = mOnESCallDelegate;
                 Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
+            }else{
+                HDLUtils.WriteLine("鏈敮鎸佺殑鍙瀵硅绫诲瀷");
+
             }
 #else
-            #region
+            #region Android 澶勭悊
 
             Intent intent = null;
             if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
+                //寰呭垹鍑忎笉蹇呰鍙傛暟
                 intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
-            } else if (interphoneType == InterphoneType.EZVIZ.ToString())
+                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", 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);
+
+            }
+            else if (interphoneType == InterphoneType.EZVIZ.ToString())
             {
-                //钀ょ煶鐚溂鍛煎彨澶勭悊
+                ((BaseActivity)Shared.Application.Activity).SetCamera(b =>
+                {
+                    if (b)
+                    {
+                        intent = new Android.Content.Intent();
+                        var bundle = new Android.OS.Bundle();
+                        //浼犻�抧ame鍙傛暟涓簍inyphp
+                        bundle.PutString("EzChildAccessToken", mESVideoInfo.Lc_AccessToken);
+                        bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString);
+                        bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost);
+                        bundle.PutString("EzvizAppKey", "1aa98a90489b4838b966b57018b4b04b");
+                        bundle.PutInt("Platform", 1);
+                        bundle.PutString("HomeId", mESVideoInfo.HomeId);
+                        bundle.PutString("DeviceSerial", mESVideoInfo.DeviceSerial);
+                        intent.PutExtras(bundle);
+                        intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity"));
+                        Shared.Application.Activity.StartActivity(intent);
+                    }
+                });
+                return;
+            }
+            else if (interphoneType == InterphoneType.HDL.ToString())
+            {
+                //HDL Linphone 鐙勮�愬厠
+           
+
+            }
+            else if (interphoneType == InterphoneType.FLVI.ToString())
+            {
+                //寰呭垹鍑忎笉蹇呰鍙傛暟
+                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", 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);
             }
             else
             {
-                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
+                HDLUtils.WriteLine("鏈敮鎸佺殑鍙瀵硅绫诲瀷");
+
             }
 
-            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", 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
@@ -723,8 +827,11 @@
         /// 璁惧搴忓垪鍙�
         /// </summary>
         public string DeviceSerial = string.Empty;
-
-
+        //========================HDL SIP==========================
+        /// <summary>
+        /// 璁惧sip璐﹀彿 interphoneType鏄疕DL鏃舵墠浼氭湁鍊�
+        /// </summary>
+        public string deviceSipAccount;
     }
 
 
@@ -764,6 +871,10 @@
         /// 钀ょ煶鐚溂鍛煎彨
         /// </summary>
         EZVIZ,
+        /// <summary>
+        /// 鐙勮�愬厠 HDL Linphone
+        /// </summary>
+        HDL,
 
 
     }

--
Gitblit v1.8.0