JLChen
2021-11-30 efad979b6fae76fb37a4de7e94e6bac0a85cb72c
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,11 +83,12 @@
            {
                //乐橙可视对讲
                //1.初始化LCOpenSDK_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);
@@ -107,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);
@@ -140,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);
            }
@@ -178,12 +180,13 @@
            {
                //乐橙可视对讲
                //1.初始化LCOpenSDK_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);
@@ -236,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);
@@ -299,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);