mac
2024-07-25 3f6685c77beeb12baf840733fb890860f4c26e7c
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
@@ -172,6 +172,26 @@
        }
        /// <summary>
        /// 打开实时视频画面
        /// </summary>
        /// <param name="deviceSerial">设备序列号</param>
        /// <param name="deviceId">设备id(云端上deviceId)</param>
        /// <param name="spk">设备spk(云雀上定义好的)</param>
        /// <param name="msgId">消息id</param>
        private void SkipRTVActivity(string deviceSerial, string deviceId, string spk, string msgId)
        {
#if __IOS__
            //打开萤石视频界面
            EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(deviceSerial, deviceId, spk, msgId);
#else
            HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk,msgId);
#endif
        }
        /// <summary>
        /// 浏览历史记录
@@ -258,7 +278,8 @@
                        //EZSDK.IOS.EZSDK.Play(info);
#else
                            HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, appKey, 1, DB_ResidenceData.Instance.CurrentRegion.id);
                            HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, appKey, 1, DB_ResidenceData.Instance.CurrentRegion.id,
                                HttpUtil.APP_KEY, HttpUtil.SECRET_KEY);
#endif
@@ -342,7 +363,16 @@
                    if (jpushMessageInfo.messageType.Contains(PushMessageType.DOOR_BELL.ToString()))
                    {
                        ///打开视频门锁
                        this.SkipRTVActivity(expantContent.devSerial, expantContent.deviceId, expantContent.spk, true);
                        string currentTimeStr = Utlis.GetTimestamp();   // 当前时间
                        if (string.IsNullOrEmpty(expantContent.currentTime) && string.IsNullOrEmpty(currentTimeStr) && (long.Parse(currentTimeStr) - long.Parse(expantContent.currentTime)) > 30000)
                        {    // 超时30s
                            this.SkipRTVActivity(expantContent.devSerial, expantContent.deviceId, expantContent.spk, true);
                        }
                        else
                        {
                            this.SkipRTVActivity(expantContent.devSerial, expantContent.deviceId, expantContent.spk, expantContent.msgId);
                        }
                    }
                    else if (jpushMessageInfo.messageType.Contains(PushMessageType.Alarm.ToString()))
                    {