wxr
2021-08-27 30741caa02ed108fb0fbbaeda91eb6dd7c33fc9f
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -71,6 +71,7 @@
            {
                //乐橙可视对讲
                //1.初始化LCOpenSDK_Api
                LCApiKit.SharedInstance().IsChinaMainland = OnAppConfig.Instance.RequestHttpsHost.Contains("china");//如果域名包含china,则SDK 使用乐橙的中国大陆(正式)域名
                LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken);
                LCApiKit.SharedInstance().CurrentDevicePlayToken = mESVideoInfo.Lc_PlayToken;
                LCApiKit.SharedInstance().CurrentDeviceId = mESVideoInfo.Lc_DeviceId;
@@ -83,7 +84,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,36 +94,73 @@
                //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("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);
            }
            else if (interphoneType == InterphoneType.FLVI.ToString())
            {
                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
                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("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);
            }
            else if (interphoneType == InterphoneType.HDL.ToString())
            {
                //HDLLinphone 狄耐克
                HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo);
            }
            else
            {
                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
                HDLUtils.WriteLine("未对接,不支持监视");
            }
            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("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);
#endif
        }
@@ -141,6 +179,7 @@
            {
                //乐橙可视对讲
                //1.初始化LCOpenSDK_Api
                LCApiKit.SharedInstance().IsChinaMainland = OnAppConfig.Instance.RequestHttpsHost.Contains("china");//如果域名包含china,则SDK 使用乐橙的中国大陆(正式)域名
                LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken);
                //2021-05-18 目前推送的PlayToken;有问题会导致SDK崩溃,暂时不传
                //LCApiKit.SharedInstance().CurrentDevicePlayToken = mESVideoInfo.Lc_PlayToken;
@@ -169,7 +208,13 @@
                EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(mESVideoInfo.DeviceSerial);
            }
            else
            else if (interphoneType == InterphoneType.HDL.ToString())
            {
                //HDL Linphone 狄耐克
            }
            else if (interphoneType == InterphoneType.FLVI.ToString())
            {
                ESOnIntercomViewController vc = new ESOnIntercomViewController();
@@ -181,14 +226,37 @@
                mOnESCallDelegate = new OnESCallDelegate(this);
                vc.MESCallDelegate = mOnESCallDelegate;
                Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
            }else{
                HDLUtils.WriteLine("未支持的可视对讲类型");
            }
#else
            #region
            #region Android 处理
            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", 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);
            }
            else if (interphoneType == InterphoneType.EZVIZ.ToString())
            {
@@ -213,29 +281,45 @@
                });
                return;
            }
            else if (interphoneType == InterphoneType.HDL.ToString())
            {
                //HDL Linphone 狄耐克
            }
            else if (interphoneType == InterphoneType.FLVI.ToString())
            {
                //待删减不必要参数
                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
                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("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);
            }
            else
            {
                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
                HDLUtils.WriteLine("未支持的可视对讲类型");
            }
            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("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);
            #endregion
#endif
@@ -743,8 +827,11 @@
        /// 设备序列号
        /// </summary>
        public string DeviceSerial = string.Empty;
        //========================HDL SIP==========================
        /// <summary>
        /// 设备sip账号 interphoneType是HDL时才会有值
        /// </summary>
        public string deviceSipAccount;
    }
@@ -785,7 +872,7 @@
        /// </summary>
        EZVIZ,
        /// <summary>
        ///
        /// 狄耐克 HDL Linphone
        /// </summary>
        HDL,