wxr
2024-05-23 c5cb6840bd986bbd71a9ebc232bbf44ed0e1fc3d
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -137,35 +137,36 @@
                Shared.Application.Activity.StartActivity(intent);
            }
            else if (interphoneType == InterphoneType.FLVI.ToString())
            {
            //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 = 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);
                Shared.Application.Activity.StartActivity(intent);
            }
            else if (interphoneType == InterphoneType.HDL.ToString())
            {
                //HDLLinphone 狄耐克
                HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, InterphoneType.HDL.ToString());
            }
            else if (interphoneType == InterphoneType.FREEVIEW.ToString())
            {
                string sip_account = "sip:D" + mESVideoInfo.deviceCode + "@139.159.157.75:46000";
                mESVideoInfo.deviceSipAccount = sip_account;
                HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, InterphoneType.FREEVIEW.ToString());
            }
            //    Shared.Application.Activity.StartActivity(intent);
            //}
            //else if (interphoneType == InterphoneType.HDL.ToString())
            //{
            //    //HDLLinphone 狄耐克
            //    HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, InterphoneType.HDL.ToString());
            //}
            //else if (interphoneType == InterphoneType.FREEVIEW.ToString())
            //{
            //    string sip_account = "sip:D" + mESVideoInfo.deviceCode + "@139.159.157.75:46000";
            //    mESVideoInfo.deviceSipAccount = sip_account;
            //    HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, InterphoneType.FREEVIEW.ToString());
            //}
            else
            {
                HDLUtils.WriteLine("未对接,不支持监视");
@@ -213,8 +214,14 @@
                //2.设置萤石子账号的AccessToken到SDK
                EZSDK.IOS.EZSDK.SharedInstance().SetEZAccessToken(mESVideoInfo.Lc_AccessToken);
                //3.打开视频播放页面
                EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(mESVideoInfo.DeviceSerial);
                string currentTimeStr = Utlis.GetTimestamp();   // 当前时间
                if (string.IsNullOrEmpty(mESVideoInfo.currentTime) && string.IsNullOrEmpty(currentTimeStr) && (long.Parse(currentTimeStr) - long.Parse(mESVideoInfo.currentTime)) > 30000) {    // 超时30s
                    EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(mESVideoInfo.DeviceSerial);
                }
                else {
                    EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(mESVideoInfo.DeviceSerial, mESVideoInfo.msgId);
                }
            }
            else if (interphoneType == InterphoneType.HDL.ToString())
            {
@@ -261,51 +268,28 @@
                Shared.Application.Activity.StartActivity(intent);
            }
            else if (interphoneType == InterphoneType.EZVIZ.ToString())
            {
                ((BaseActivity)Shared.Application.Activity).SetCamera(b =>
                {
                    if (b)
                    {
                        intent = new Android.Content.Intent();
                        var bundle = new Android.OS.Bundle();
                        //传递name参数为tinyphp
                        bundle.PutString("EzChildAccessToken", mESVideoInfo.Lc_AccessToken);
                        bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString);
                        bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost);
                        bundle.PutString("EzvizAppKey", "1aa98a90489b4838b966b57018b4b04b");
                        bundle.PutInt("Platform", 1);
                        bundle.PutString("HomeId", mESVideoInfo.HomeId);
                        bundle.PutString("DeviceSerial", mESVideoInfo.DeviceSerial);
                        intent.PutExtras(bundle);
                        intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity"));
                        Shared.Application.Activity.StartActivity(intent);
                    }
                });
                return;
            }
            else if (interphoneType == InterphoneType.HDL.ToString())
            {
                //HDL Linphone 狄耐克
            //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);
            //}
            //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);
                Shared.Application.Activity.StartActivity(intent);
            }
            //    Shared.Application.Activity.StartActivity(intent);
            //}
            else
            {
                HDLUtils.WriteLine("未支持的可视对讲类型");
@@ -816,6 +800,14 @@
        /// 设备序列号
        /// </summary>
        public string DeviceSerial = string.Empty;
        /// <summary>
        /// 服务器推送时间
        /// </summary>
        public string currentTime = string.Empty;
        /// <summary>
        /// 消息id
        /// </summary>
        public string msgId = string.Empty;
        //========================HDL SIP==========================
        /// <summary>
        /// 设备sip账号 interphoneType是HDL时才会有值
@@ -861,7 +853,7 @@
        /// <summary>
        /// 丰林平台
        /// </summary>
        FLVI,
        //FLVI,
        /// <summary>
        /// 大华可视对讲平台
        /// </summary>
@@ -869,15 +861,15 @@
        /// <summary>
        /// 萤石猫眼呼叫
        /// </summary>
        EZVIZ,
        //EZVIZ,
        /// <summary>
        /// 狄耐克 HDL Linphone
        /// </summary>
        HDL,
        //HDL,
        /// <summary>
        /// 全视通对讲
        /// </summary>
        FREEVIEW,
        //FREEVIEW,
    }
}