From 0af30aadd6e0b6549bdcc6c2b2c82b8d12294b85 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 10 十一月 2021 17:26:23 +0800 Subject: [PATCH] 2021-11-10 1.Android没适配乐橙国内环境问题修复。 --- HDL-ON_Android/LeChengVideoActivity.cs | 15 ++++++- HDL_ON/DAL/Server/HttpUtil.cs | 4 +- HDL-ON_iOS/HDL-ON_iOS.csproj | 2 .vs/HDL_APP_Project/xs/UserPrefs.xml | 18 ++++++-- HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs | 62 +++++++++++++------------------ 5 files changed, 54 insertions(+), 47 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index e40466e..1db39a6 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,18 +1,26 @@ 锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.ED470421-805C-4716-A37A-2F00FD3DF71D" /> - <MonoDevelop.Ide.Workbench> + <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs"> <Files> - <File FileName="HDL-ON_Android/LeChengVideoActivity.cs" Line="166" Column="35" /> + <File FileName="HDL-ON_iOS/AppDelegate.cs" Line="1" Column="1" /> + <File FileName="HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs" /> + <File FileName="HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs" Line="66" Column="21" /> + <File FileName="HDL-ON_Android/LeChengVideoActivity.cs" /> + <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="HDL_APP_Project" expanded="True"> - <Node name="HDL-ON_Android" expanded="True"> - <Node name="References" expanded="True"> - <Node name="Shared.Droid.LCVideoSDK" selected="True" /> + <Node name="HDL_ON" expanded="True"> + <Node name="UI" expanded="True"> + <Node name="UI2" expanded="True" /> </Node> </Node> + <Node name="HDL-ON_Android" expanded="True" /> + <Node name="HDL-ON_iOS" expanded="True"> + <Node name="AppDelegate.cs" selected="True" /> + </Node> </Node> </State> </Pad> diff --git a/HDL-ON_Android/LeChengVideoActivity.cs b/HDL-ON_Android/LeChengVideoActivity.cs index 2d2a0cc..1d26881 100644 --- a/HDL-ON_Android/LeChengVideoActivity.cs +++ b/HDL-ON_Android/LeChengVideoActivity.cs @@ -31,7 +31,9 @@ { private static LeChengVideoActivity CurtActivity; // - private string URL = "openapi.easy4ip.com:443"; + private string URL = "openapi.easy4ip.com:443"; //娴峰锛堟寮忥級 + private static string URL_LC_CHINA = "openapi.lechange.cn:443"; //涓浗澶ч檰(姝e紡) + private static string URL_LC_Overseas = "openapi.easy4ip.com:443"; //涓浗澶ч檰(姝e紡) public string AccessToken = ""; public string DeviceId = ""; public string Psk = ""; @@ -112,8 +114,7 @@ mPlayWindow = new LCOpenSDK_PlayWindow(); mPlayWindow.InitPlayWindow(this, flWindowContent, 0, true); - if (Location == 1) - URL = "openapi.easy4ip.com:443"; + } /// <summary> @@ -121,6 +122,14 @@ /// </summary> private void InitLCSDK() { + + if (Location == 1) + { + URL = URL_LC_Overseas; + }else { + URL = URL_LC_CHINA; + } + InitParams initParams = new InitParams(this, URL, AccessToken); LCOpenSDK_Api.InitOpenApi(initParams); } diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index 9f839ae..af40167 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -69,7 +69,7 @@ <MtouchLink>SdkOnly</MtouchLink> <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> <MtouchI18n>cjk</MtouchI18n> - <CodesignProvision>ComHdlOnProAdHoc20210616-1</CodesignProvision> + <CodesignProvision>ComHdlOnProAdHoc20210914-1</CodesignProvision> </PropertyGroup> <ItemGroup> <Reference Include="System" /> diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index d2292ee..cf4a06a 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -17,8 +17,8 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm + //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm /// <summary> /// RegionMark /// </summary> diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs index c0d9f52..a8e6062 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,7 +83,7 @@ { //涔愭鍙瀵硅 //1.鍒濆鍖朙COpenSDK_Api - LCApiKit.SharedInstance().IsChinaMainland = OnAppConfig.Instance.RequestHttpsHost.Contains("china");//濡傛灉鍩熷悕鍖呭惈china锛屽垯SDK 浣跨敤涔愭鐨勪腑鍥藉ぇ闄�(姝e紡)鍩熷悕 + LCApiKit.SharedInstance().IsChinaMainland = GetIsChinaMainland(); LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken); LCApiKit.SharedInstance().CurrentDevicePlayToken = mESVideoInfo.Lc_PlayToken; LCApiKit.SharedInstance().CurrentDeviceId = mESVideoInfo.Lc_DeviceId; @@ -108,20 +120,14 @@ 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); @@ -141,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); } @@ -179,7 +180,7 @@ { //涔愭鍙瀵硅 //1.鍒濆鍖朙COpenSDK_Api - LCApiKit.SharedInstance().IsChinaMainland = OnAppConfig.Instance.RequestHttpsHost.Contains("china");//濡傛灉鍩熷悕鍖呭惈china锛屽垯SDK 浣跨敤涔愭鐨勪腑鍥藉ぇ闄�(姝e紡)鍩熷悕 + LCApiKit.SharedInstance().IsChinaMainland = GetIsChinaMainland(); LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken); //2021-05-18 鐩墠鎺ㄩ�佺殑PlayToken;鏈夐棶棰樹細瀵艰嚧SDK宕╂簝锛屾殏鏃朵笉浼� //LCApiKit.SharedInstance().CurrentDevicePlayToken = mESVideoInfo.Lc_PlayToken; @@ -238,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); @@ -301,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