| | |
| | | if (interphoneType == InterphoneType.IMOUVISIAL.ToString()) |
| | | { |
| | | //乐橙可视对讲 |
| | | //1.初始化LCOpenSDK_Api |
| | | //1.初始化LCOpenSDK_Api(Shared.IOS.LCVideoOnSDK) |
| | | LCApiKit.SharedInstance().IsChinaMainland = GetIsChinaMainland(); |
| | | LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken); |
| | | LCApiKit.SharedInstance().CurrentDevicePlayToken = mESVideoInfo.Lc_PlayToken; |
| | |
| | | } |
| | | else if(interphoneType == InterphoneType.FLVI.ToString()) |
| | | { |
| | | |
| | | //Shared.IOS.ESVideoOnSDK |
| | | ESOnMonitorViewController vc = new ESOnMonitorViewController(); |
| | | vc.MESVideoID = mESVideoInfo.ESVideoUUID; |
| | | vc.MESRoomID = roomID; |
| | | vc.DeviceName = mESVideoInfo.DeviceName; |
| | | //vc.RoomName = mESVideoInfo.RoomName; |
| | | //vc.MESCallDelegate = new OnESCallDelegate(this); |
| | | Shared.Application.currentVC.NavigationController.PushViewController(vc, true); |
| | | }else if (interphoneType == InterphoneType.HDL.ToString()) |
| | | } |
| | | else if (interphoneType == InterphoneType.HDL.ToString()) |
| | | { |
| | | //HDLLinphone 狄耐克 |
| | | HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo); |
| | | ////全视通 |
| | | //NSDictionary deviceInfo = new NSDictionary("deviceCode","3-1-11-2", "deviceName", mESVideoInfo.DeviceName); |
| | | //Shared.IOS.HDLFVSDK.Video.Monitor(deviceInfo); |
| | | HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, interphoneType); |
| | | } else if (interphoneType == InterphoneType.FREEVIEW.ToString()) |
| | | { |
| | | //全视通监视 |
| | | NSDictionary deviceInfo = new NSDictionary("deviceCode",mESVideoInfo.deviceCode, "deviceName", mESVideoInfo.DeviceName); |
| | | Shared.IOS.HDLFVSDK.Video.Monitor(deviceInfo); |
| | | //HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo); |
| | | //NSDictionary deviceInfo = new NSDictionary("deviceCode",mESVideoInfo.deviceCode, "deviceName", mESVideoInfo.DeviceName); |
| | | //Shared.IOS.HDLFVSDK.Video.Monitor(deviceInfo); |
| | | } |
| | | else |
| | | { |
| | |
| | | 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()); |
| | | } |
| | |
| | | if (interphoneType == InterphoneType.IMOUVISIAL.ToString()) |
| | | { |
| | | //乐橙可视对讲 |
| | | //1.初始化LCOpenSDK_Api |
| | | //1.初始化LCOpenSDK_Api(Shared.IOS.LCVideoOnSDK) |
| | | LCApiKit.SharedInstance().IsChinaMainland = GetIsChinaMainland(); |
| | | LCApiKit.SharedInstance().InitSDKOpenApi(mESVideoInfo.Lc_AccessToken); |
| | | //2021-05-18 目前推送的PlayToken;有问题会导致SDK崩溃,暂时不传 |
| | |
| | | //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()) |
| | | { |
| | |
| | | } |
| | | else if (interphoneType == InterphoneType.FLVI.ToString()) |
| | | { |
| | | |
| | | //Shared.IOS.ESVideoOnSDK |
| | | ESOnIntercomViewController vc = new ESOnIntercomViewController(); |
| | | vc.MESVideoID = mESVideoInfo.ESVideoUUID; |
| | | vc.MESRoomID = roomID; |
| | |
| | | mOnESCallDelegate = new OnESCallDelegate(this); |
| | | vc.MESCallDelegate = mOnESCallDelegate; |
| | | Shared.Application.currentVC.NavigationController.PushViewController(vc, true); |
| | | }else{ |
| | | } |
| | | else{ |
| | | HDLUtils.WriteLine("未支持的可视对讲类型"); |
| | | |
| | | } |
| | |
| | | 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); |
| | | //获取萤石token,初始化sdk |
| | | var result = new HttpServerRequest().EZGetChildToken(); |
| | | if (result.Code == StateCode.SUCCESS) |
| | | { |
| | | var ezChildAccessToken = result.Data.ToString(); |
| | | |
| | | Com.Videogo.Hdl.HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id, |
| | | HttpUtil.APP_KEY, HttpUtil.SECRET_KEY); |
| | | |
| | | Com.Videogo.Hdl.HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity, |
| | | mESVideoInfo.Lc_DeviceId, mESVideoInfo.DeviceSerial, mESVideoInfo.spk, mESVideoInfo.msgId); |
| | | } |
| | | |
| | | //intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity")); |
| | | //Shared.Application.Activity.StartActivity(intent); |
| | | } |
| | | }); |
| | | return; |
| | |
| | | intent.PutExtra("callId", mESVideoInfo.callId); |
| | | intent.PutExtra("Type", 1); |
| | | |
| | | |
| | | |
| | | |
| | | Shared.Application.Activity.StartActivity(intent); |
| | | } |
| | | else |
| | | { |
| | | HDLUtils.WriteLine("未支持的可视对讲类型"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | #endif |
| | | } |
| | |
| | | #if __IOS__ |
| | | #region OnESCallDelegate |
| | | /////// <summary> |
| | | /////// OnESCallDelegate 继承响应事件 |
| | | /////// OnESCallDelegate 继承响应事件(Shared.IOS.ESVideoOnSDK) |
| | | /////// </summary> |
| | | OnESCallDelegate mOnESCallDelegate; |
| | | |
| | |
| | | |
| | | #region OnLCCallDelegate |
| | | /////// <summary> |
| | | /////// OnLCCallDelegate 继承响应事件 |
| | | /////// OnLCCallDelegate 继承响应事件(Shared.IOS.LCVideoOnSDK) |
| | | /////// </summary> |
| | | OnLCCallDelegate mOnLCCallDelegate; |
| | | |
| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #endif |
| | | |
| | | ///// <summary> |
| | |
| | | /// 设备序列号 |
| | | /// </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时才会有值 |