From 0f13be8b24ef37fe16cd34c8411a907f93b7f304 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 28 十一月 2023 09:35:42 +0800
Subject: [PATCH] Merge branch 'Wxr-V2.4.2' into Google-2023-11-17-1

---
 HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs |   71 +++++++++++++++++++++--------------
 1 files changed, 42 insertions(+), 29 deletions(-)

diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
index c67c196..be9c20d 100644
--- a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -108,7 +108,7 @@
             else if (interphoneType == InterphoneType.HDL.ToString())
             {
                 //HDLLinphone 鐙勮�愬厠
-                HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, interphoneType);
+                //HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, interphoneType);
             } else if (interphoneType == InterphoneType.FREEVIEW.ToString())
             {
                 //鍏ㄨ閫氱洃瑙�
@@ -140,16 +140,16 @@
             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 = 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);
 
 
 
@@ -158,13 +158,14 @@
             else if (interphoneType == InterphoneType.HDL.ToString())
             {
                 //HDLLinphone 鐙勮�愬厠
-                HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, InterphoneType.HDL.ToString());
+                //HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, InterphoneType.HDL.ToString());
             }
             else if (interphoneType == InterphoneType.FREEVIEW.ToString())
             {
-                string sip_account = "sip:D" + mESVideoInfo.deviceCode + "@139.159.157.75:46000";
-                mESVideoInfo.deviceSipAccount = sip_account;
-                HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, InterphoneType.FREEVIEW.ToString());
+                //string sip_account = "sip:D" + mESVideoInfo.deviceCode + "@139.159.157.75:46000";
+
+                //mESVideoInfo.deviceSipAccount = sip_account;
+                //HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, InterphoneType.FREEVIEW.ToString());
             }
             else
             {
@@ -284,8 +285,20 @@
                         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);
+                        //鑾峰彇钀ょ煶token锛屽垵濮嬪寲sdk
+                        var result = new HttpServerRequest().EZGetChildToken();
+                        if (result.Code == StateCode.SUCCESS)
+                        {
+                            var ezChildAccessToken = result.Data.ToString();
+
+                            //Com.Videogo.Hdl.HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id);
+
+                            //Com.Videogo.Hdl.HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,
+                            //    mESVideoInfo.Lc_DeviceId, mESVideoInfo.DeviceSerial, mESVideoInfo.spk, mESVideoInfo.msgId);
+                        }
+
+                        //intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity"));
+                        //Shared.Application.Activity.StartActivity(intent);
                     }
                 });
                 return;
@@ -298,19 +311,19 @@
             }
             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 = 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);
 
-                Shared.Application.Activity.StartActivity(intent);
+                //Shared.Application.Activity.StartActivity(intent);
             }
             else
             {

--
Gitblit v1.8.0