From cbc156bc38d8b8eae7aef60cb186ab2b52fa701f Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期二, 16 七月 2024 13:59:56 +0800
Subject: [PATCH] 增加全部挂断

---
 HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
index c67c196..c7174a6 100644
--- a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -163,6 +163,7 @@
             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());
             }
@@ -284,8 +285,21 @@
                         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,
+                                HttpUtil.APP_KEY, HttpUtil.SECRET_KEY);
+
+                            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;

--
Gitblit v1.8.0