EZDemo/HDLEZDemo/HDLEZDemo.xcodeproj/project.pbxproj
@@ -719,10 +719,11 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = HDLEZDemo/HDLEZDemo.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = C9G3CHFW76; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = BVTA78PRYA; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -769,10 +770,11 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = HDLEZDemo/HDLEZDemo.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = C9G3CHFW76; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = BVTA78PRYA; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( EZDemo/HDLEZDemo/HDLEZDemo/AppDelegate.m
@@ -25,10 +25,10 @@ // Override point for customization after application launch. [[EZSDK sharedInstance] initLibWithAppKey:@"1aa98a90489b4838b966b57018b4b04b" globalAppKey:@"1aa98a90489b4838b966b57018b4b04b"]; // [[EZSDK sharedInstance] initLibWithAppKey:@"941b1b72b6294998acfd36c14931b675" globalAppKey:@"941b1b72b6294998acfd36c14931b675"]; [[EZSDK sharedInstance] setHDlAccessToken:@"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiIyOTRkNmI1ZGIyZTE0OTBiOGVjZGZjMGE1YmZkMzM0MCIsImNvbXBhbnlJZCI6IjAiLCJyb2xlIjoiIiwiaGVhZGVyUHJlZml4IjoiQmVhcmVyICIsInVzZXJBY2NvdW50Ijoid3hyIiwidGVuYW50SWQiOiIyMCIsInVzZXJUeXBlIjoiVVNFUl9DIiwidG9rZW5UeXBlIjoiYWNjZXNzX3Rva2VuIiwidXNlck5hbWUiOiJ3eHIiLCJ1c2VyRGF0YVJpZ2h0IjoiMSIsIm9wZW5BcHBsaWNhdGlvbklkIjoiMCIsInVzZXJJZCI6IjEzOTIwMzU1NjgyMDQ0MjMxNjkiLCJleHAiOjE2ODg3Mjg5MTQsIm5iZiI6MTY4ODcyMTcxNH0.M-Q-M1o0FFIxdU8jjoFP3kHJn9YCtDGa1QDfmEd71fpxP_MfXKLITfZ08OL4ORpgLGM6pKvWHduG-WrR6qJqDiUkL-xFV10pdXXN2OXN6uBRL06Ab5uo3ybOn1YDJTd_LY6HuZxblnckmXNcCCoDEfGqIpTTl00HcEw2E4uexoM" refreshToken:@"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI1NGRhMzk1ZGE0ZGM0YzgwODYyNGMyY2JlYWZiMjFmNiIsImNvbXBhbnlJZCI6IjAiLCJoZWFkZXJQcmVmaXgiOiJCZWFyZXIgIiwidGVuYW50SWQiOiIyMCIsInRva2VuVHlwZSI6InJlZnJlc2hfdG9rZW4iLCJvcGVuQXBwbGljYXRpb25JZCI6IjAiLCJ1c2VySWQiOiIxMzkyMDM1NTY4MjA0NDIzMTY5IiwiZXhwIjoxNjg5MzI2NTE0LCJuYmYiOjE2ODg3MjE3MTR9.FPQUh_0HyO-TYzNhm1gnr8Gpbe2q3LMXkvJR10wZvk1NwYpsU7x4ekBMWYBL_PZ9BT_pEQ_0GzZRIkPQsZ-NgZtx2NmJ9CcE_qTwtyi9JLnpFsYDWn7sWSSpwDYJYmfT04Oqfu466Pgthibc59HZcZo629CjN7FkJCV5Wv3lL5k"]; [[EZSDK sharedInstance] setRequestHttpsHostAndPlatform:@"https://test-gz.hdlcontrol.com" platform:1 homeId:@"1547099040465408002"]; [[EZSDK sharedInstance] setHDlAccessToken:@"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI1N2YyOWRlNWNhNWY0MjAwOTFkMmM2NDdmMDcwNmQ5YiIsImNvbXBhbnlJZCI6IjAiLCJyb2xlIjoiIiwiaGVhZGVyUHJlZml4IjoiQmVhcmVyICIsInRlbmFudElkIjoiMjAiLCJ1c2VyVHlwZSI6IlVTRVJfQyIsInRva2VuVHlwZSI6ImFjY2Vzc190b2tlbiIsInVzZXJOYW1lIjoic3hjXzAwNCIsInVzZXJEYXRhUmlnaHQiOiIxIiwib3BlbkFwcGxpY2F0aW9uSWQiOiIwIiwidXNlcklkIjoiMTU3NTA1OTM5MDAzMjYyNTY2NiIsImV4cCI6MTY5MDM0NjIxMiwibmJmIjoxNjkwMzM5MDEyfQ.CE_qD_vFzPHb_k0fXaLWNq85aLuposP6aubZLhJpc-CbIsAYGUUeiDC_fXResD9YIvCQLmCWDVGrFxabSF54uOzNX_-BXPqGvgRnmSMHeVCZ69BDKu9a3fm6fSc3LrVP_pPQ74O8yBLNjzsPWY7LI4twUhj5JazzN_vS3d71QhQ" refreshToken:@"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiIxMzI5OTExZGY1YzU0NzQ4ODFhZDg5MDdkY2I2ZDA1OCIsImNvbXBhbnlJZCI6IjAiLCJoZWFkZXJQcmVmaXgiOiJCZWFyZXIgIiwidGVuYW50SWQiOiIyMCIsInRva2VuVHlwZSI6InJlZnJlc2hfdG9rZW4iLCJvcGVuQXBwbGljYXRpb25JZCI6IjAiLCJ1c2VySWQiOiIxNTc1MDU5MzkwMDMyNjI1NjY2IiwiZXhwIjoxNjkwOTQzODEyLCJuYmYiOjE2OTAzMzkwMTJ9.XXd0-YKJER6Oabs-fqTNgi1quCJxIJmvfBQLtke1FnXZo2qp5x-VFYM1dDKhmdeo3v-bPClIfKl_Lng0HWbnNz8YmIrMt5S_uIkwntqpuCHmnnX2Jjcf0TyhO8NhT7XYIMcCUnJIb4A9L_sY4Lt6s_Cu7GCt5fw8QYiDt9OezPo"]; [[EZSDK sharedInstance] setRequestHttpsHostAndPlatform:@"https://test-gz.hdlcontrol.com" platform:1 homeId:@"1683653084909764610"]; // [[EZSDK sharedInstance] setRequestHttpsHostAndPlatform:@"https://nearest.hdlcontrol.com" platform:1 homeId:@"1546324800135176193"]; [[EZSDK sharedInstance] setEZAccessToken:@"ra.5b950z7g0d00zrtl62938p9mcq6fr7yj-1e833bz5oi-1lfptjs-2hswa4ysz"]; [[EZSDK sharedInstance] setEZAccessToken:@"ra.d3159vy1d0oss4r0bfewp28d0l88hsdt-8oj76pwpx4-1x1hz7a-5e0llpjhh"]; // [[EZSDK sharedInstance] setEZAccessToken:@"ra.3hkirwcadrpfmaa89wep99io3wto4yds-7zptb10d20-1wxg4f3-ygiojudee"]; EZDemo/HDLEZDemo/HDLEZDemo/ViewController.m
@@ -10,7 +10,7 @@ //萤石门锁spk #define HDLEZ_DOOR_SPK @"security.door.ezviz" #define HDLEZ_DEVICEID @"1678282604879122434" #define HDLEZ_DEVICEID @"1679420297738518530" //#define HDLEZ_DEVICESERIAL @"K36229010" #define HDLEZ_DEVICESERIAL @"L32590140" @@ -46,7 +46,7 @@ } - (IBAction)toDoorCamera:(id)sender { [[EZSDK sharedInstance] PlayWithDeviceSerial:HDLEZ_DEVICESERIAL deviceId:HDLEZ_DEVICEID deviceType:HDLEZ_DOOR_SPK]; [[EZSDK sharedInstance] PlayWithDeviceSerial:HDLEZ_DEVICESERIAL deviceId:HDLEZ_DEVICEID deviceType:HDLEZ_DOOR_SPK msgId:@""]; } - (IBAction)toTempView:(id)sender { EZDemo/HDLEZDemo/HDLEZDemo/include/EZSDK/EZSDK.h
@@ -75,9 +75,21 @@ */ - (void)Play:(EZDeviceInfo*)deviceInfo; /** 查看视频监控直播 @param deviceInfo 设备信息 @param msgId 消息Id @param isShow 是否展示呼叫弹框 */ - (void)Play:(EZDeviceInfo*)deviceInfo messageId:(NSString *)msgId showCallout:(BOOL)isShow; /// 指定序列号 查看视频监控直播 /// @param deviceSerial 序列号 - (void)PlayWithDeviceSerial:(NSString *)deviceSerial; /// 指定序列号 查看视频监控直播(猫眼呼叫功能) /// @param deviceSerial 序列号 - (void)PlayWithDeviceSerial:(NSString *)deviceSerial msgId:(NSString *)msgId; /** 根据spk进入门锁视频 @@ -88,6 +100,15 @@ -(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString*)deviceId deviceType:(NSString *)deviceType; /** 根据spk进入门锁视频 @param deviceSerial 序列号 @param deviceId 设备id @param deviceType 设备spk(用于区分是否为门锁) @param msgId 消息id */ -(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString*)deviceId deviceType:(NSString *)deviceType msgId:(NSString *)msgId; /** 打开摄像头设置页面 */ - (void)setting:(EZDeviceInfo*)deviceInfo; EZDemo/HDLEZDemo/HDLEZDemo/libEZSDK.aBinary files differ
EZDemo/HDLEZDemo/HDLEZDemo/resources/en.lproj/Localizable.strings
@@ -73,7 +73,7 @@ "device_open_success"="Success to open the door!"; "device_please_input_door_password"="Input the unlock password"; "device_history"="History"; "device_his_no_more_data"="No more data"; "device_his_no_more_data"="In the end"; "device_temp_pass"="Temporary password"; "device_temp_year"="."; "device_temp_month"="."; @@ -111,7 +111,7 @@ "device_callout_alert_message" = "Doorbell on call..."; "device_callout_hang_up" = "Hang up"; "device_callout_ignore" = "Ignore"; "device_callout_answer" = "Answer"; "device_callout_answered" = "Answer"; "device_full_scene_play" = "play"; "device_full_scene_pause" = "Pause"; "device_full_scene_sound" = "Sound"; EZDemo/HDLEZDemo/HDLEZDemo/resources/zh-Hans.lproj/Localizable.strings
@@ -71,7 +71,7 @@ "device_callout_alert_message" = "门铃呼叫中..."; "device_callout_hang_up" = "挂断"; "device_callout_ignore" = "忽略"; "device_callout_answer" = "接听"; "device_callout_answered" = "接听"; "device_full_scene_play" = "播放"; "device_full_scene_pause" = "暂停"; "device_full_scene_sound" = "音量"; @@ -85,7 +85,7 @@ "device_open_success"="开门成功!"; "device_please_input_door_password"="请输入开锁密码"; "device_history"="历史记录"; "device_his_no_more_data"="没有更多数据"; "device_his_no_more_data"="到底啦"; "device_temp_pass"="临时密码"; "device_temp_year"="年"; "device_temp_month"="月"; EZSDK.IOS/EZSDK.IOS/ApiDefinition.cs
@@ -1,103 +1,111 @@ using Foundation; using Foundation; using ObjCRuntime; namespace EZSDK.IOS { // @protocol EZSDKDelegate <NSObject> [Protocol, Model(AutoGeneratedName = true)] [BaseType(typeof(NSObject))] interface EZSDKDelegate { // @required -(void)addDeviceSuccessed:(NSString *)deviceSerial; [Abstract] [Export("addDeviceSuccessed:")] void AddDeviceSuccessed(string deviceSerial); } // @protocol EZSDKDelegate <NSObject> [Protocol, Model (AutoGeneratedName = true)] [BaseType (typeof(NSObject))] interface EZSDKDelegate { // @required -(void)addDeviceSuccessed:(NSString *)deviceSerial; [Abstract] [Export ("addDeviceSuccessed:")] void AddDeviceSuccessed (string deviceSerial); } // @interface EZSDK : NSObject [BaseType(typeof(NSObject))] interface EZSDK { [Wrap("WeakDelegate")] EZSDKDelegate Delegate { get; set; } // @interface EZSDK : NSObject [BaseType (typeof(NSObject))] interface EZSDK { [Wrap ("WeakDelegate")] EZSDKDelegate Delegate { get; set; } // @property (nonatomic, weak) id<EZSDKDelegate> delegate; [NullAllowed, Export("delegate", ArgumentSemantic.Weak)] NSObject WeakDelegate { get; set; } // @property (nonatomic, weak) id<EZSDKDelegate> delegate; [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] NSObject WeakDelegate { get; set; } // @property (nonatomic, strong) NSArray * connectTipModels; [Export("connectTipModels", ArgumentSemantic.Strong)] // [Verify(StronglyTypedNSArray)] NSObject[] ConnectTipModels { get; set; } // @property (nonatomic, strong) NSArray * connectTipModels; [Export ("connectTipModels", ArgumentSemantic.Strong)] //[Verify (StronglyTypedNSArray)] NSObject[] ConnectTipModels { get; set; } // +(instancetype)sharedInstance; [Static] [Export("sharedInstance")] EZSDK SharedInstance(); // +(instancetype)sharedInstance; [Static] [Export ("sharedInstance")] EZSDK SharedInstance (); // -(BOOL)initLibWithAppKey:(NSString *)appKey globalAppKey:(NSString *)globalAppKey; [Export("initLibWithAppKey:globalAppKey:")] bool InitLibWithAppKey(string appKey, string globalAppKey); // -(BOOL)initLibWithAppKey:(NSString *)appKey globalAppKey:(NSString *)globalAppKey; [Export ("initLibWithAppKey:globalAppKey:")] bool InitLibWithAppKey (string appKey, string globalAppKey); // -(void)setEZAccessToken:(NSString *)accessToken; [Export("setEZAccessToken:")] void SetEZAccessToken(string accessToken); // -(void)setEZAccessToken:(NSString *)accessToken; [Export ("setEZAccessToken:")] void SetEZAccessToken (string accessToken); // -(void)setHDlAccessToken:(NSString *)accessToken refreshToken:(NSString *)refreshToken; [Export("setHDlAccessToken:refreshToken:")] void SetHDlAccessToken(string accessToken, string refreshToken); // -(void)setHDlAccessToken:(NSString *)accessToken refreshToken:(NSString *)refreshToken; [Export ("setHDlAccessToken:refreshToken:")] void SetHDlAccessToken (string accessToken, string refreshToken); // -(void)setRequestHttpsHostAndPlatform:(NSString *)requestHttpsHost platform:(int)platform homeId:(NSString *)homeId; [Export("setRequestHttpsHostAndPlatform:platform:homeId:")] void SetRequestHttpsHostAndPlatform(string requestHttpsHost, int platform, string homeId); // -(void)setRequestHttpsHostAndPlatform:(NSString *)requestHttpsHost platform:(int)platform homeId:(NSString *)homeId; [Export ("setRequestHttpsHostAndPlatform:platform:homeId:")] void SetRequestHttpsHostAndPlatform (string requestHttpsHost, int platform, string homeId); // -(void)go2EZvizMonitor; [Export("go2EZvizMonitor")] void Go2EZvizMonitor(); // -(void)go2EZvizMonitor; [Export ("go2EZvizMonitor")] void Go2EZvizMonitor (); // -(void)toEZDeviceListViewWithFilterTypes:(NSArray *)filterTepes; [Export("toEZDeviceListViewWithFilterTypes:")] // [Verify(StronglyTypedNSArray)] void ToEZDeviceListViewWithFilterTypes(NSObject[] filterTepes); // -(void)toEZDeviceListViewWithFilterTypes:(NSArray *)filterTepes; [Export ("toEZDeviceListViewWithFilterTypes:")] //[Verify (StronglyTypedNSArray)] void ToEZDeviceListViewWithFilterTypes (NSObject[] filterTepes); // -(void)addEzvizMonitor; [Export("addEzvizMonitor")] void AddEzvizMonitor(); // -(void)addEzvizMonitor; [Export ("addEzvizMonitor")] void AddEzvizMonitor (); // -(void)addEzvizMonitorWithDeviceType:(NSString *)deviceType; [Export("addEzvizMonitorWithDeviceType:")] void AddEzvizMonitorWithDeviceType(string deviceType); // -(void)addEzvizMonitorWithDeviceType:(NSString *)deviceType; [Export ("addEzvizMonitorWithDeviceType:")] void AddEzvizMonitorWithDeviceType (string deviceType); // -(void)Play:(id)deviceInfo; [Export("Play:")] void Play(NSObject deviceInfo); // -(void)Play:(id)deviceInfo; [Export ("Play:")] void Play (NSObject deviceInfo); // -(void)Play:(id)deviceInfo showCallout:(BOOL)isShow; [Export("Play:showCallout:")] void Play(NSObject deviceInfo, bool isShow); // -(void)Play:(id)deviceInfo messageId:(NSString *)msgId showCallout:(BOOL)isShow; [Export ("Play:messageId:showCallout:")] void Play (NSObject deviceInfo, string msgId, bool isShow); // -(void)PlayWithDeviceSerial:(NSString *)deviceSerial; [Export("PlayWithDeviceSerial:")] void PlayWithDeviceSerial(string deviceSerial); // -(void)PlayWithDeviceSerial:(NSString *)deviceSerial; [Export ("PlayWithDeviceSerial:")] void PlayWithDeviceSerial (string deviceSerial); // -(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString *)deviceId deviceType:(NSString *)deviceType; [Export("PlayWithDeviceSerial:deviceId:deviceType:")] void PlayWithDeviceSerial(string deviceSerial, string deviceId, string deviceType); // -(void)PlayWithDeviceSerial:(NSString *)deviceSerial msgId:(NSString *)msgId; [Export ("PlayWithDeviceSerial:msgId:")] void PlayWithDeviceSerial (string deviceSerial, string msgId); // -(void)setting:(id)deviceInfo; [Export("setting:")] void Setting(NSObject deviceInfo); // -(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString *)deviceId deviceType:(NSString *)deviceType; [Export ("PlayWithDeviceSerial:deviceId:deviceType:")] void PlayWithDeviceSerial (string deviceSerial, string deviceId, string deviceType); // -(void)playBackVideo:(id)deviceInfo; [Export("playBackVideo:")] void PlayBackVideo(NSObject deviceInfo); // -(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString *)deviceId deviceType:(NSString *)deviceType msgId:(NSString *)msgId; [Export ("PlayWithDeviceSerial:deviceId:deviceType:msgId:")] void PlayWithDeviceSerial (string deviceSerial, string deviceId, string deviceType, string msgId); // -(void)toTemPassView:(NSString *)deviceId; [Export("toTemPassView:")] void ToTemPassView(string deviceId); // -(void)setting:(id)deviceInfo; [Export ("setting:")] void Setting (NSObject deviceInfo); // -(void)toDeviceMsgListView:(NSString *)deviceId; [Export("toDeviceMsgListView:")] void ToDeviceMsgListView(string deviceId); } // -(void)playBackVideo:(id)deviceInfo; [Export ("playBackVideo:")] void PlayBackVideo (NSObject deviceInfo); // -(void)toTemPassView:(NSString *)deviceId; [Export ("toTemPassView:")] void ToTemPassView (string deviceId); // -(void)toDeviceMsgListView:(NSString *)deviceId; [Export ("toDeviceMsgListView:")] void ToDeviceMsgListView (string deviceId); } } EZSDK.IOS/EZSDK.IOS/EZSDK.IOS.csproj
@@ -104,6 +104,10 @@ <BundleResource Include="Resources\hdl_ez_cat_eyes_ignore%403x.png" /> <BundleResource Include="Resources\large_back_btn%402x.png" /> <BundleResource Include="Resources\large_back_btn%403x.png" /> <BundleResource Include="Resources\hdl_ez_cat_eyes_answer%402x.png" /> <BundleResource Include="Resources\hdl_ez_cat_eyes_answer%403x.png" /> <BundleResource Include="Resources\hdl_ez_msg_placeholder%402x.png" /> <BundleResource Include="Resources\hdl_ez_msg_placeholder%403x.png" /> </ItemGroup> <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" /> </Project> EZSDK.IOS/EZSDK.IOS/Library/libEZSDK.aBinary files differ
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_cat_eyes_answer@2x.png
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_cat_eyes_answer@3x.png
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_msg_placeholder@2x.png
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_msg_placeholder@3x.png
EZSDK/EZSDK/EZ/Global/EZHttpUtil.h
@@ -161,6 +161,16 @@ enable:(NSInteger)enable completion:(void (^)(ResponseData *responseData))completion; /** * @since 更新接听状态 * @param msgId 消息id * @param answerStatus 接听状态(answer 已接听、no_answer 未接听) * @param completion 回调block,error为空时表示成功 */ - (void)updateAnswerStatusWithMsgId:(NSString *)msgId answerStatus:(NSString *)answerStatus completion:(void (^)(ResponseData *responseData))completion; @end NS_ASSUME_NONNULL_END EZSDK/EZSDK/EZ/Global/EZHttpUtil.m
@@ -32,6 +32,7 @@ #define API_POST_EZ_GetCoverSwitchStaus @"/home-wisdom/platform/yingshi/getCoverSwitchStatus"//获取萤石镜头遮蔽开关状态 #define API_POST_EZ_GetCoverSwitch @"/home-wisdom/platform/yingshi/coverSwitch"//设置萤石镜头遮蔽开关 #define AOI_POST_EZ_UpdateAnswerStatus @"/home-wisdom/platform/yingshi/lock/updateAnswerStatus" // 更改门铃通话状态(接听和未接) #pragma mark APP_KEY #define APP_KEY @"HDL-HOME-APP-TEST" @@ -450,6 +451,29 @@ } /** * @since 更新接听状态 * @param msgId 消息id * @param answerStatus 接听状态(answer 已接听、no_answer 未接听) * @param completion 回调block,error为空时表示成功 */ - (void)updateAnswerStatusWithMsgId:(NSString *)msgId answerStatus:(NSString *)answerStatus completion:(void (^)(ResponseData *responseData))completion { //设置请求参数 NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; [parameters setValue:msgId forKey:@"msgId"]; [parameters setValue:answerStatus forKey:@"answerStatus"]; parameters = [self GetSignRequestDictionary:parameters]; [self requestHttpsPost:AOI_POST_EZ_UpdateAnswerStatus parameters:parameters completion:^(ResponseData *responseData) { if (completion) { completion (responseData); } }]; } /** * @since 设置镜头隐私遮蔽状态 * @param deviceSerial 设备序列号 * @param enable 隐私遮蔽状态 EZSDK/EZSDK/EZ/TempPassword/Controllers/HDLEZDeviceMsgListViewController.m
@@ -117,8 +117,9 @@ weakSelf.msgListV.msgList=weakSelf.msgList; if (weakSelf.msgListModel.list.count == weakSelf.pageSize) { weakSelf.currentPageNo+=1; } else { [weakSelf.footer endRefreshingWithNoMoreData]; } [weakSelf.footer endRefreshingWithNoMoreData]; }else{ [weakSelf.view makeToast:responseData.message duration:1.5 @@ -250,6 +251,7 @@ self.photos = [NSMutableArray array]; [self.photos addObject:[MWPhoto photoWithURL:[NSURL URLWithString:picUrl]]]; MWPhotoBrowser *browser = [[MWPhotoBrowser alloc] initWithDelegate:self]; browser.displayActionButton = NO; browser.zoomPhotosToFill = NO; [browser showDownloadBtn]; EZSDK/EZSDK/EZ/UIViewControllers/EZDeviceTableViewController.m
@@ -192,9 +192,6 @@ EZDeviceInfo *deviceInfo = sender; if ([[segue destinationViewController] isKindOfClass:[EZLivePlayViewController class]]) { ((EZLivePlayViewController *)[segue destinationViewController]).deviceInfo = deviceInfo; #warning mock test NSLog(@"#######跳转到设备详情页"); ((EZLivePlayViewController *)[segue destinationViewController]).isShowAlert = YES; } else if ([[segue destinationViewController] isKindOfClass:[EZPlaybackViewController class]]) { ((EZPlaybackViewController *)[segue destinationViewController]).deviceInfo = deviceInfo; } else if ([[segue destinationViewController] isKindOfClass:[EZMessageListViewController class]]) { EZSDK/EZSDK/EZ/UIViewControllers/EZLivePlayViewController.h
@@ -19,6 +19,7 @@ @property (nonatomic, copy) NSString *deviceSerial;//设备序列号 @property (nonatomic, copy) NSString *deviceId;//设备id @property (nonatomic, copy) NSString *msgId; // 消息id @property (nonatomic, assign) BOOL isVideoDoorLock; // 是否为视频门锁 EZSDK/EZSDK/EZ/UIViewControllers/EZLivePlayViewController.m
@@ -284,6 +284,14 @@ return _doorPlayerView; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; if (self.navigationController) { self.navigationController.navigationBar.hidden = NO; [self.navigationController setNavigationBarHidden:NO]; } } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; self.navigationController.navigationBar.hidden = NO;//2021-02-01 @@ -501,7 +509,7 @@ [self.ignoreButton setTitle:HDLEZLocallizedString(@"device_callout_ignore") forState:UIControlStateNormal]; self.ignoreButton.imagePosition = HDLEZOPButtonImagePositionTop; self.ignoreButton.spacingBetweenImageAndTitle = 12.; [self.answerButton setTitle:HDLEZLocallizedString(@"device_callout_answer") forState:UIControlStateNormal]; [self.answerButton setTitle:HDLEZLocallizedString(@"device_callout_answered") forState:UIControlStateNormal]; self.answerButton.imagePosition = HDLEZOPButtonImagePositionTop; self.answerButton.spacingBetweenImageAndTitle = 12.; @@ -512,11 +520,22 @@ [self.fullSceneToolView configPlayStatus:YES soundOn:YES videoLevel:_cameraInfo.videoLevel toolOperation:^(HDLEZVideoFullSceneOperation operationType) { [weakSelf doorLockFullSceneOperation:operationType]; }]; // 挂断弹框 if (_isShowAlert) { [self showCallOutAlertView]; } else { [self hiddenCallOutAlertView]; } } /*开锁 */ -(void)unlockDoor{ if (![self isSupportOneKeyUnlockDoor]) { // 不支持一键开锁 [UIView dd_showMessage:@"该设备不支持一键开锁"]; return; } [HDLEZAlertInputView showInputAlertWithtitle:HDLEZLocallizedString(@"device_please_input_door_password") cancleTitle:HDLEZLocallizedString(@"device_temp_cancle") sureTitle:HDLEZLocallizedString(@"device_temp_sure") keyboardType:UIKeyboardTypeASCIICapableNumberPad cancleBlock:^{ } sureBlock:^(NSString * _Nonnull content) { @@ -864,7 +883,11 @@ self.streamToken=tokenInfo.token; if (!_unlockButton.isEnabled) { [_unlockButton setImage:[UIImage imageNamed:@"hdl_ez_ic_unlock"] forState:UIControlStateNormal]; if ([self isSupportOneKeyUnlockDoor]) { // 支持一键开锁 [_unlockButton setImage:[UIImage imageNamed:@"hdl_ez_ic_unlock"] forState:UIControlStateNormal]; } else { [_unlockButton setImage:[UIImage imageNamed:@"hdl_ez_ic_unlock_disable"] forState:UIControlStateNormal]; } _unlockButton.enabled=YES; } } @@ -947,7 +970,7 @@ [self.scrollView setTranslatesAutoresizingMaskIntoConstraints:NO]; [self.playerView setTranslatesAutoresizingMaskIntoConstraints:NO]; [NSLayoutConstraint deactivateConstraints:@[self.scrollViewTopMargin, self.scrollViewWHRatio, self.playerViewWHRatio, self.playerViewBottomMargin]]; self.scrollViewTopMargin = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.topLayoutGuide attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-HDLEZ_APP_STATUS_BAR_HEIGHT]; self.scrollViewTopMargin = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.topLayoutGuide attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-[self hdlEZStatusBarHeight]]; self.scrollViewWHRatio = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.scrollView attribute:NSLayoutAttributeHeight multiplier:HDLEZ_APP_SCREEN_WIDTH/HDLEZ_APP_SCREEN_HEIGHT constant:0]; self.playerViewWHRatio = [NSLayoutConstraint constraintWithItem:self.playerView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.playerView attribute:NSLayoutAttributeHeight multiplier:self.doorPlayerAspectRatio constant:0]; @@ -1429,6 +1452,12 @@ - (IBAction)clickCalloutHangupAction:(id)sender { self.isShowAlert = NO; [self closeTalkView:self.talkCloseButton]; if (self.msgId && self.msgId.length > 0) { [[EZHttpUtil sharedManager] updateAnswerStatusWithMsgId:self.msgId answerStatus:@"no_answer" completion:^(ResponseData * _Nonnull responseData) { HDLEZLog(@"###########挂断####:%@", [responseData yy_modelToJSONString]); }]; } [self.navigationController popViewControllerAnimated:YES]; } - (IBAction)clickCalloutIgnoreAction:(id)sender { @@ -1441,6 +1470,12 @@ self.isShowAlert = NO; self.isAnswering = YES; [self talkButtonClicked:self.talkButton]; if (self.msgId && self.msgId.length > 0) { [[EZHttpUtil sharedManager] updateAnswerStatusWithMsgId:self.msgId answerStatus:@"answer" completion:^(ResponseData * _Nonnull responseData) { HDLEZLog(@"###########接听####:%@", [responseData yy_modelToJSONString]); }]; } [self.navigationController popViewControllerAnimated:YES]; } @@ -1766,7 +1801,7 @@ #pragma Setter - (void)setIsShowAlert:(BOOL)isShowAlert { _isShowAlert = isShowAlert; if (isShowAlert) { if (_isShowAlert) { [self showCallOutAlertView]; } else { [self hiddenCallOutAlertView]; @@ -1786,4 +1821,24 @@ return YES; } - (CGFloat)hdlEZStatusBarHeight { if (@available(iOS 13.0, *)) { NSSet *set = [UIApplication sharedApplication].connectedScenes; UIWindowScene *windowScene = [set anyObject]; UIStatusBarManager *statusBarManager = windowScene.statusBarManager; return statusBarManager.statusBarFrame.size.height; } else { return [UIApplication sharedApplication].statusBarFrame.size.height; } } /// 是否支持一键开锁 - (BOOL)isSupportOneKeyUnlockDoor { BOOL isSupport = YES; if (self.deviceInfo && self.deviceInfo.deviceType && ([self.deviceInfo.deviceType containsString:@"LT20VC"] || [self.deviceInfo.deviceType containsString:@"LT20VC"])) { isSupport = NO; } return isSupport; } @end EZSDK/EZSDK/EZSDK.h
@@ -78,13 +78,18 @@ /** 查看视频监控直播 @param deviceInfo 设备信息 @param msgId 消息Id @param isShow 是否展示呼叫弹框 */ - (void)Play:(EZDeviceInfo*)deviceInfo showCallout:(BOOL)isShow; - (void)Play:(EZDeviceInfo*)deviceInfo messageId:(NSString *)msgId showCallout:(BOOL)isShow; /// 指定序列号 查看视频监控直播 /// @param deviceSerial 序列号 - (void)PlayWithDeviceSerial:(NSString *)deviceSerial; /// 指定序列号 查看视频监控直播(猫眼呼叫功能) /// @param deviceSerial 序列号 - (void)PlayWithDeviceSerial:(NSString *)deviceSerial msgId:(NSString *)msgId; /** 根据spk进入门锁视频 @@ -95,6 +100,15 @@ -(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString*)deviceId deviceType:(NSString *)deviceType; /** 根据spk进入门锁视频 @param deviceSerial 序列号 @param deviceId 设备id @param deviceType 设备spk(用于区分是否为门锁) @param msgId 消息id */ -(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString*)deviceId deviceType:(NSString *)deviceType msgId:(NSString *)msgId; /** 打开摄像头设置页面 */ - (void)setting:(EZDeviceInfo*)deviceInfo; EZSDK/EZSDK/EZSDK.m
@@ -204,12 +204,19 @@ [[self getCurrentVC] pushViewController:rootViewController animated:YES]; } - (void)Play:(EZDeviceInfo*)deviceInfo showCallout:(BOOL)isShow { /** 查看视频监控直播 @param deviceInfo 设备信息 @param msgId 消息Id @param isShow 是否展示呼叫弹框 */ - (void)Play:(EZDeviceInfo*)deviceInfo messageId:(NSString *)msgId showCallout:(BOOL)isShow { [GlobalKit shareKit].deviceType=HDLEZDeviceType_Default; UIStoryboard *addDeviceStoryBoard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil]; EZLivePlayViewController *rootViewController = [addDeviceStoryBoard instantiateViewControllerWithIdentifier:@"EZLivePlayViewController"]; rootViewController.isShowAlert = isShow; rootViewController.deviceInfo=(EZDeviceInfo *)deviceInfo; rootViewController.msgId = msgId; NSLog(@"play--iphone--deviceName -%@",rootViewController.deviceInfo.deviceName); [[self getCurrentVC].navigationBar setHidden:NO]; @@ -232,6 +239,22 @@ }]; } /// 指定序列号 查看视频监控直播(猫眼呼叫功能) /// @param deviceSerial 序列号 - (void)PlayWithDeviceSerial:(NSString *)deviceSerial msgId:(NSString *)msgId { //获取设备列表接口 [EZOpenSDK getDeviceInfo:deviceSerial completion:^(EZDeviceInfo *deviceInfo, NSError *error) { if(error) { NSLog(@"EZ 查询设备信息失败"); return; } if (deviceInfo) { [self Play:deviceInfo messageId:msgId showCallout:YES]; } }]; } /** 根据序列号进入门锁视频 @param deviceSerial 序列号 @@ -253,6 +276,24 @@ [[self getCurrentVC] pushViewController:vc animated:YES]; } -(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString*)deviceId deviceType:(NSString *)deviceType msgId:(NSString *)msgId { if ([[self getCurrentVC] isKindOfClass:[EZLivePlayViewController class]]) {//防止重复进入 return; } [GlobalKit shareKit].deviceType=[deviceType isEqualToString:HDLEZ_DOOR_SPK] ? HDLEZDeviceType_Door : HDLEZDeviceType_Default; UIStoryboard *ezMainStoryBoard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil]; EZLivePlayViewController *vc = [ezMainStoryBoard instantiateViewControllerWithIdentifier:@"EZLivePlayViewController"]; vc.deviceId=deviceId; vc.deviceSerial=deviceSerial; vc.isShowAlert = YES; vc.msgId = msgId; vc.isVideoDoorLock = [deviceType isEqualToString:HDLEZ_DOOR_SPK]; [[self getCurrentVC] setNavigationBarHidden:NO]; [[self getCurrentVC].navigationBar setHidden:NO]; [[self getCurrentVC] pushViewController:vc animated:YES]; } /** 打开摄像头设置页面 */