| | |
| | | #import "LCOnMonitorViewController.h" |
| | | #import <AVFoundation/AVFoundation.h> |
| | | #import <Photos/Photos.h> |
| | | #import "LCKit.h" |
| | | |
| | | |
| | | #import "LCUtlis.h" |
| | | #import "LCApiKit.h" |
| | | #import <LCOpenSDKDynamic/LCOpenSDKDynamic.h> |
| | | |
| | | @interface LCOnMonitorViewController ()<LCOpenSDK_EventListener> |
| | | |
| | |
| | | [self initESVideo]; |
| | | [self StartMonitoring]; |
| | | |
| | | //暂时不支持开锁功能 |
| | | [self setUnlock:NO]; |
| | | // //暂时不支持开锁功能 |
| | | // [self setUnlock:NO]; |
| | | //注册开锁成功监听 |
| | | [self addOpenSuccessAction]; |
| | | // Do any additional setup after loading the view. |
| | | } |
| | | |
| | |
| | | [_unlockImgBtn setImage:[UIImage imageNamed:@"ic_esvideo_on_unlock_unselect"] forState:UIControlStateNormal]; |
| | | [_unlockTextBtn setTitleColor:TextColor forState:UIControlStateNormal]; |
| | | //开锁 |
| | | // if(_es){ |
| | | // [_es openTheDoorWithRoomid:_mESRoomID]; |
| | | // } |
| | | if(self.mLCCallDelegate != NULL){ |
| | | [self.mLCCallDelegate onUnlockAction]; |
| | | } |
| | | } |
| | | |
| | | - (UIButton *)unlockTextBtn{ |
| | |
| | | if (type == 0) { |
| | | |
| | | if ([RTSP_Result_String(STATE_RTSP_DESCRIBE_READY) isEqualToString:code]) { |
| | | // dispatch_async(dispatch_get_main_queue(), ^{ |
| | | // }); |
| | | // dispatch_async(dispatch_get_main_queue(), ^{ |
| | | // }); |
| | | return; |
| | | } |
| | | if ([RTSP_Result_String(STATE_RTSP_PLAY_READY) isEqualToString:code]) { |
| | | // dispatch_async(dispatch_get_main_queue(), ^{ |
| | | // }); |
| | | // dispatch_async(dispatch_get_main_queue(), ^{ |
| | | // }); |
| | | return; |
| | | } |
| | | //提示失败 |
| | |
| | | |
| | | } |
| | | |
| | | - (void)addOpenSuccessAction { |
| | | |
| | | [[NSNotificationCenter defaultCenter] removeObserver:self |
| | | name:LCCallDelegateOpenDoorSuccess |
| | | object:nil]; |
| | | |
| | | [[NSNotificationCenter defaultCenter] addObserver:self |
| | | selector:@selector(setOpenDoorSuccess) |
| | | name:LCCallDelegateOpenDoorSuccess |
| | | object:nil]; |
| | | } |
| | | |
| | | |
| | | @end |
| | | |