From 54c202bd4867092fca2bc6f96bec0cfd1056a46a Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期一, 06 十一月 2023 11:24:20 +0800 Subject: [PATCH] 2023年11月06日11:23:46 --- HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs | 33 ++++++++++++++++++++++++++++++--- 1 files changed, 30 insertions(+), 3 deletions(-) diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs index e583183..88dfbdf 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()); } @@ -213,8 +214,14 @@ //2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK EZSDK.IOS.EZSDK.SharedInstance().SetEZAccessToken(mESVideoInfo.Lc_AccessToken); //3.鎵撳紑瑙嗛鎾斁椤甸潰 - EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(mESVideoInfo.DeviceSerial); + string currentTimeStr = Utlis.GetTimestamp(); // 褰撳墠鏃堕棿 + if (string.IsNullOrEmpty(mESVideoInfo.currentTime) && string.IsNullOrEmpty(currentTimeStr) && (long.Parse(currentTimeStr) - long.Parse(mESVideoInfo.currentTime)) > 30000) { // 瓒呮椂30s + EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(mESVideoInfo.DeviceSerial); + } + else { + EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(mESVideoInfo.DeviceSerial, mESVideoInfo.msgId); + } } else if (interphoneType == InterphoneType.HDL.ToString()) { @@ -278,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; @@ -816,6 +835,14 @@ /// 璁惧搴忓垪鍙� /// </summary> public string DeviceSerial = string.Empty; + /// <summary> + /// 鏈嶅姟鍣ㄦ帹閫佹椂闂� + /// </summary> + public string currentTime = string.Empty; + /// <summary> + /// 娑堟伅id + /// </summary> + public string msgId = string.Empty; //========================HDL SIP========================== /// <summary> /// 璁惧sip璐﹀彿 interphoneType鏄疕DL鏃舵墠浼氭湁鍊� -- Gitblit v1.8.0