JLChen
2021-07-08 35a1f11de802c78b89460c696ffbe8b1c8346a39
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -4,6 +4,7 @@
using System.Threading;
using System.Collections.Generic;
using HDL_ON.UI.UI2.PersonalCenter.PirDevice;
using HDL_ON.Entity;
#if __IOS__
using Shared.IOS.ESVideoOnSDK;
@@ -66,7 +67,7 @@
            int.TryParse(mESVideoInfo.roomno, out roomID);
#if __IOS__
            if (interphoneType == "IMOUVISIAL")
            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
            {
                //乐橙可视对讲
                //1.初始化LCOpenSDK_Api
@@ -95,7 +96,7 @@
            }
#else
            Intent intent = null;
            if (interphoneType == "IMOUVISIAL")
            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
            {
                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
            }
@@ -136,7 +137,7 @@
            int roomID = 0;
            int.TryParse(mESVideoInfo.roomno, out roomID);
#if __IOS__
            if (interphoneType == "IMOUVISIAL")
            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
            {
                //乐橙可视对讲
                //1.初始化LCOpenSDK_Api
@@ -152,6 +153,21 @@
                vc.MLCCallDelegate = mOnLCCallDelegate;
                //vc.MLCCallDelegate = new OnLCCallDelegate(this);
                Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
            }
            else if (interphoneType == InterphoneType.EZVIZ.ToString())
            {
                //萤石猫眼呼叫
                //初始化萤石云SDK,中文国内key、英文海外key 开发者账号使用应用包名申请的APPKEY,不同包名应用需配置不同的APPKEY
                EZSDK.IOS.EZSDK.InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
                //1.设置所需河东的AccessToken和RefreshToken、域名地址
                EZSDK.IOS.EZSDK.SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken);
                EZSDK.IOS.EZSDK.SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, mESVideoInfo.HomeId);
                //2.设置萤石子账号的AccessToken到SDK
                EZSDK.IOS.EZSDK.SetEZAccessToken(mESVideoInfo.Lc_AccessToken);
                //3.打开视频播放页面
                EZSDK.IOS.EZSDK.PlayWithDeviceSerial(mESVideoInfo.DeviceSerial);
            }
            else
            {
@@ -170,9 +186,12 @@
            #region
            Intent intent = null;
            if (interphoneType == "IMOUVISIAL")
            if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
            {
                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
            } else if (interphoneType == InterphoneType.EZVIZ.ToString())
            {
                //萤石猫眼呼叫处理
            }
            else
            {
@@ -598,31 +617,33 @@
        }
        #endregion
#endif
        /// <summary>
        /// 测试方法
        /// </summary>
        /// <param name="isMonitor"></param>
        public void Test(bool isMonitor = true)
        {
            ESVideoInfo eSVideoInfo = new ESVideoInfo()
            {
                DeviceName = "室外机88",
                ESVideoUUID = "JJY000019VPLLF",
        ///// <summary>
        ///// 测试方法
        ///// </summary>
        ///// <param name="isMonitor"></param>
        //public void Test(bool isMonitor = true)
        //{
        //    ESVideoInfo eSVideoInfo = new ESVideoInfo()
        //    {
        //        DeviceName = "室外机88",
        //        ESVideoUUID = "JJY000019VPLLF",
            };
            if (isMonitor)
            {
                ShowESVideoMonitor(eSVideoInfo, "");
            }
            else
            {
                eSVideoInfo.callId = "88888";
                ShowESvideoVideoIntercom(eSVideoInfo, "");
            }
        //    };
        //    if (isMonitor)
        //    {
        //        ShowESVideoMonitor(eSVideoInfo, "");
        //    }
        //    else
        //    {
        //        eSVideoInfo.callId = "88888";
        //        ShowESvideoVideoIntercom(eSVideoInfo, "");
        //    }
        }
        //}
    }
    /// <summary>
@@ -667,9 +688,9 @@
        //========================大华==========================
        /// <summary>
        /// 账号accessToken
        /// 萤石子账号Token也共用这个字段
        /// </summary>
        public string Lc_AccessToken = string.Empty;
@@ -692,6 +713,17 @@
        /// 账号标记:0国内,1国外;国内国外访问都地址不一样
        /// </summary>
        public int Lc_Location = 0;
        //========================萤石云猫眼==========================
        /// <summary>
        /// 住宅Id
        /// </summary>
        public string HomeId = string.Empty;
        /// <summary>
        /// 设备序列号
        /// </summary>
        public string DeviceSerial = string.Empty;
    }
@@ -728,5 +760,11 @@
        /// 大华可视对讲平台
        /// </summary>
        IMOUVISIAL,
        /// <summary>
        /// 萤石猫眼呼叫
        /// </summary>
        EZVIZ,
    }
}