1
wei
2021-06-09 cda2410f9c29f2fadc16e9de38ccae95b75a89dd
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -46,7 +46,7 @@
        public ESVideoInfo esVideoInfo;
        /// <summary>
        ///
        /// 暂时没用
        /// </summary>
        public void InitESVideoSDK()
        {
@@ -56,49 +56,15 @@
        /// <summary>
        /// 监控页面
        /// </summary>
        /// <param name="mESVideoInfo"></param>
        /// <param name="mESVideoInfo">丰林监视所需相关参数</param>
        public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo)
        {
            this.esVideoInfo = mESVideoInfo;
#if __IOS__
             int roomID = 0;
            int.TryParse(mESVideoInfo.roomno, out roomID);
            ESOnMonitorViewController vc = new ESOnMonitorViewController();
            vc.MESVideoID = mESVideoInfo.ESVideoUUID;
            //vc.MESRoomID = mESVideoInfo.ESRoomID;
            vc.DeviceName = mESVideoInfo.DeviceName;
            //vc.RoomName = mESVideoInfo.RoomName;
            vc.MESCallDelegate = new OnESCallDelegate(this);
            Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
#else
            Intent 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", mESVideoInfo.HomeID);
            intent.PutExtra("callId", mESVideoInfo.callId);
            intent.PutExtra("Type", 0);
            Shared.Application.Activity.StartActivity(intent);
#endif
        }
        /// <summary>
        /// 被呼叫页面
        /// </summary>
        /// <param name="mESVideoInfo"></param>
        public void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo)
        {
            this.esVideoInfo = mESVideoInfo;
#if __IOS__
            ESOnIntercomViewController vc = new ESOnIntercomViewController();
            vc.MESVideoID = mESVideoInfo.ESVideoUUID;
            //vc.MESRoomID = mESVideoInfo.ESRoomID;
            vc.MESRoomID =roomID;
            vc.DeviceName = mESVideoInfo.DeviceName;
            //vc.RoomName = mESVideoInfo.RoomName;
            //vc.MESCallDelegate = new OnESCallDelegate(this);
@@ -114,7 +80,45 @@
            intent.PutExtra("cmtID", mESVideoInfo.cmtID);
            intent.PutExtra("roomno", mESVideoInfo.roomno);
            intent.PutExtra("unitno", mESVideoInfo.unitno);
            intent.PutExtra("HomeID", mESVideoInfo.HomeID);
            //intent.PutExtra("HomeID", mESVideoInfo.HomeID);
            intent.PutExtra("callId", mESVideoInfo.callId);
            intent.PutExtra("Type", 0);
            Shared.Application.Activity.StartActivity(intent);
#endif
        }
        /// <summary>
        /// 被呼叫页面
        /// </summary>
        /// <param name="mESVideoInfo">丰林呼叫功能所需相关参数</param>
        public void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo)
        {
            this.esVideoInfo = mESVideoInfo;
#if __IOS__
            int roomID = 0;
            int.TryParse(mESVideoInfo.roomno, out roomID);
            ESOnIntercomViewController vc = new ESOnIntercomViewController();
            vc.MESVideoID = mESVideoInfo.ESVideoUUID;
            vc.MESRoomID = roomID;
            vc.DeviceName = mESVideoInfo.DeviceName;
            //vc.RoomName = mESVideoInfo.RoomName;
            //vc.MESCallDelegate = new OnESCallDelegate(this);
            mOnESCallDelegate = new OnESCallDelegate(this);
            vc.MESCallDelegate = mOnESCallDelegate;
            Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
#else
            Intent 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", mESVideoInfo.HomeID);
            intent.PutExtra("callId", mESVideoInfo.callId);
            intent.PutExtra("Type", 1);
            Shared.Application.Activity.StartActivity(intent);
@@ -298,23 +302,29 @@
            { IsBackground = false }.Start();
        }
#endregion
        #endregion
#if __IOS__
#region OnESCallDelegate
        #region OnESCallDelegate
        /////// <summary>
        /////// OnESCallDelegate 继承响应事件
        /////// </summary>
        OnESCallDelegate mOnESCallDelegate;
        /// <summary>
        ///
        /// iOS原生委托事件
        /// </summary>
        public class OnESCallDelegate : ESCallDelegate
        {
            /// <summary>
            /// ESOnVideo
            /// </summary>
            [Weak] ESOnVideo _ESOnVideo;
            /// <summary>
            /// 初始化
            /// </summary>
            /// <param name="mESOnVideo">呼叫相关的参数</param>
            public OnESCallDelegate(ESOnVideo mESOnVideo)
            {
                _ESOnVideo = mESOnVideo;
@@ -398,7 +408,7 @@
    }
    /// <summary>
    ///
    /// 丰林监视和呼叫功能所需相关参数
    /// </summary>
    public class ESVideoInfo
    {
@@ -415,27 +425,27 @@
        /// <summary>
        /// 丰林请求的唯一id
        /// </summary>
        public string uuid;
        public string uuid = string.Empty;
        /// <summary>
        /// 丰林社区id
        /// </summary>
        public string cmtID;
        public string cmtID = string.Empty;
        /// <summary>
        /// 丰林房间号
        /// </summary>
        public string roomno;
        public string roomno = string.Empty;
        /// <summary>
        /// 丰林楼栋号
        /// </summary>
        public string unitno;
        public string unitno = string.Empty;
        ///// <summary>
        ///// 丰林住宅Id
        ///// </summary>
        //public string HomeID;
        //public string HomeID= string.Empty;
        /// <summary>
        /// 呼叫记录Id
        /// </summary>
        public string callId;
        public string callId = string.Empty;
    }