From c2cae389c932a9ab2c03d67d0276376655f26343 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期二, 06 八月 2024 14:17:04 +0800 Subject: [PATCH] OnPro(安卓/IOS)可视对讲 TCP UDP连接选择 ;自动切换服务器 --- HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs index 900d456..1164faa 100644 --- a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs +++ b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs @@ -13,6 +13,7 @@ using Android.Widget; using Com.Hdl.Hdllinphonesdk; #else +using Other; using Foundation; using UIKit; using Shared.IOS.HDLLinphoneSDK; @@ -126,7 +127,7 @@ //鐧诲綍sip鏈嶅姟鍣� #if __IOS__ - Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm); + Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm,DB_ResidenceData.Instance.linphoneConnectType.ToString()); #else if (mInterphoneType == InterphoneType.FREEVIEW.ToString()) { @@ -135,7 +136,8 @@ mHDLSipInfo.sipPasswd, mHDLSipInfo.realm, //"sip:139.159.157.75:47000;transport=udp", - HDLLinphoneKit.InterPhoneTypeFreeview + HDLLinphoneKit.InterPhoneTypeFreeview, + DB_ResidenceData.Instance.linphoneConnectType.ToString() ); } else @@ -146,7 +148,8 @@ mHDLSipInfo.realm, //mHDLSipInfo.proxy+ ";transport=udp", //"sip:139.159.157.75:47000;transport=udp", - HDLLinphoneKit.InterPhoneTypeHdl + HDLLinphoneKit.InterPhoneTypeHdl, + DB_ResidenceData.Instance.linphoneConnectType.ToString() ); } #endif @@ -607,7 +610,7 @@ bool IsIncomingReceivedCallState() { #if __IOS__ - return Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().IsIncomingReceivedCallState; + return HDLLinPhoneSDK.Instance().IsIncomingReceivedCallState; #else return HDLLinphoneKit.Instance.IsIncomingReceivedCallState; #endif @@ -620,6 +623,7 @@ #if __IOS__ + HDLLinPhoneSDK.Instance().GotoHDLLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName); #else @@ -885,6 +889,7 @@ /// </summary> public override void OnRejectCallAction() { + MainPage.Log("iOS 鍏ㄩ儴鎷掓帴"); Other.SoundPlayer.Ins.StopSound(); hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL); } @@ -893,7 +898,7 @@ /// 鎴浘鎴愬姛 /// </summary> /// <param name = "image" ></ param > - public void OnScreenshotSuccessfulAction(UIImage image) + public override void OnScreenshotSuccessfulAction(UIImage image) { //NSData imageData = UIImagePNGRepresentation(image); UIImage NSData imageData = image.AsPNG(); @@ -919,6 +924,18 @@ Utlis.WriteLine("OnIncomingCall :" + userName); } + public override void OnRejectAllCallAction() + { + MainPage.Log("iOS 鍏ㄩ儴鎷掓帴"); + Other.SoundPlayer.Ins.StopSound(); + hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL); + hdlLinphone.HDLRejectCallIn(); + } + + //public override void OnScreenshotSuccessfulAction(UIImage image) + //{ + // throw new NotImplementedException(); + //} } #endregion -- Gitblit v1.8.0