JLChen
2021-11-10 0af30aadd6e0b6549bdcc6c2b2c82b8d12294b85
2021-11-10 1.Android没适配乐橙国内环境问题修复。
5个文件已修改
101 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/LeChengVideoActivity.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.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>
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"; //中国大陆(正式)
        private static string URL_LC_Overseas = "openapi.easy4ip.com:443"; //中国大陆(正式)
        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);
        }
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" />
HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </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>
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -57,6 +57,18 @@
        }
        /// <summary>
        /// 如果域名包含china,则SDK 使用乐橙的中国大陆(正式)域名
        /// </summary>
        /// <returns></returns>
        bool GetIsChinaMainland()
        {
            //强制使用国内
            //return true;
            return OnAppConfig.Instance.RequestHttpsHost.Contains("china");//如果域名包含china,则SDK 使用乐橙的中国大陆(正式)域名
        }
        /// <summary>
        /// 监控页面
        /// </summary>
        /// <param name="mESVideoInfo"></param>
@@ -71,7 +83,7 @@
            {
                //乐橙可视对讲
                //1.初始化LCOpenSDK_Api
                LCApiKit.SharedInstance().IsChinaMainland = OnAppConfig.Instance.RequestHttpsHost.Contains("china");//如果域名包含china,则SDK 使用乐橙的中国大陆(正式)域名
                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.初始化LCOpenSDK_Api
                LCApiKit.SharedInstance().IsChinaMainland = OnAppConfig.Instance.RequestHttpsHost.Contains("china");//如果域名包含china,则SDK 使用乐橙的中国大陆(正式)域名
                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);