From 0ab9960587ececb5d3e13e7fb062e2f67308f9e7 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 30 十一月 2021 13:33:03 +0800 Subject: [PATCH] 2021-11-30 1.修复乐橙Android,没调用拒接接口问题。 --- HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs | 74 ++++++++++++++++++------------------ 1 files changed, 37 insertions(+), 37 deletions(-) diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs index aabc46e..0965c39 100644 --- a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs +++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs @@ -57,6 +57,18 @@ } /// <summary> + /// 濡傛灉鍩熷悕鍖呭惈china锛屽垯SDK 浣跨敤涔愭鐨勪腑鍥藉ぇ闄�(姝e紡)鍩熷悕 + /// </summary> + /// <returns></returns> + bool GetIsChinaMainland() + { + ////寮哄埗浣跨敤鍥藉唴 + //return true; + + return OnAppConfig.Instance.RequestHttpsHost.Contains("china");//濡傛灉鍩熷悕鍖呭惈china锛屽垯SDK 浣跨敤涔愭鐨勪腑鍥藉ぇ闄�(姝e紡)鍩熷悕 + } + + /// <summary> /// 鐩戞帶椤甸潰 /// </summary> /// <param name="mESVideoInfo"></param> @@ -71,11 +83,12 @@ { //涔愭鍙瀵硅 //1.鍒濆鍖朙COpenSDK_Api + LCApiKit.SharedInstance().IsChinaMainland = GetIsChinaMainland(); LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken); LCApiKit.SharedInstance().CurrentDevicePlayToken = mESVideoInfo.Lc_PlayToken; LCApiKit.SharedInstance().CurrentDeviceId = mESVideoInfo.Lc_DeviceId; LCApiKit.SharedInstance().CurrentDeviceName = mESVideoInfo.DeviceName; - LCApiKit.SharedInstance().CurrentPsk = mESVideoInfo.Lc_DeviceId; + LCApiKit.SharedInstance().CurrentPsk = mESVideoInfo.Lc_Psk; //2.璋冩暣鐩戣椤甸潰 LCOnMonitorViewController vc = new LCOnMonitorViewController(); mOnLCCallDelegate = new OnLCCallDelegate(this); @@ -83,7 +96,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,26 +106,28 @@ //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("Type", 0); + intent.PutExtra("callId", mESVideoInfo.callId); + intent.PutExtra("DeviceName", mESVideoInfo.DeviceName); 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("Location", GetIsChinaMainland() ? 0 : 1);//濡傛灉鍩熷悕鍖呭惈china锛屽垯鏄浗鍐呰处鍙�); intent.PutExtra("PlayToken", mESVideoInfo.Lc_PlayToken); intent.PutExtra("Psk", mESVideoInfo.Lc_Psk); @@ -132,12 +147,7 @@ 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); } @@ -170,12 +180,13 @@ { //涔愭鍙瀵硅 //1.鍒濆鍖朙COpenSDK_Api + LCApiKit.SharedInstance().IsChinaMainland = GetIsChinaMainland(); LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken); //2021-05-18 鐩墠鎺ㄩ�佺殑PlayToken;鏈夐棶棰樹細瀵艰嚧SDK宕╂簝锛屾殏鏃朵笉浼� //LCApiKit.SharedInstance().CurrentDevicePlayToken = mESVideoInfo.Lc_PlayToken; LCApiKit.SharedInstance().CurrentDeviceId = mESVideoInfo.Lc_DeviceId; LCApiKit.SharedInstance().CurrentDeviceName = mESVideoInfo.DeviceName; - LCApiKit.SharedInstance().CurrentPsk = mESVideoInfo.Lc_DeviceId; + LCApiKit.SharedInstance().CurrentPsk = mESVideoInfo.Lc_Psk; //2.璺宠浆涔愭鍛煎彨椤甸潰 LCOnIntercomViewController vc = new LCOnIntercomViewController(); mOnLCCallDelegate = new OnLCCallDelegate(this); @@ -228,20 +239,14 @@ { //寰呭垹鍑忎笉蹇呰鍙傛暟 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", 1); - + //=========涔愭========== + intent.PutExtra("Type", 1); + intent.PutExtra("callId", mESVideoInfo.callId); + intent.PutExtra("DeviceName", mESVideoInfo.DeviceName); 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("Location", GetIsChinaMainland() ? 0 : 1);//濡傛灉鍩熷悕鍖呭惈china锛屽垯鏄浗鍐呰处鍙�); intent.PutExtra("PlayToken", mESVideoInfo.Lc_PlayToken); intent.PutExtra("Psk", mESVideoInfo.Lc_Psk); @@ -291,12 +296,7 @@ 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); -- Gitblit v1.8.0