| | |
| | | #import "Toast+UIView.h" |
| | | #import "EZStreamPlayer.h" |
| | | #import "MBProgressHUD.h" |
| | | |
| | | #import "EZPMPlayPrivateTokenInfo.h" |
| | | |
| | | #define MinimumZoomScale 1.0 |
| | | #define MaximumZoomScale 4.0 |
| | |
| | | @property (weak, nonatomic) IBOutlet UILabel *streamTypeLabel; |
| | | @property (weak, nonatomic) IBOutlet UIScrollView *scrollView; |
| | | @property (weak, nonatomic) IBOutlet UILabel *zoomSizeLabel; |
| | | |
| | | @property (nonatomic, copy) NSString *streamToken; |
| | | |
| | | @end |
| | | |
| | |
| | | self.scrollView.userInteractionEnabled = YES; |
| | | self.scrollView.multipleTouchEnabled = YES; |
| | | self.scrollView.pagingEnabled = NO; |
| | | |
| | | if ([GlobalKit shareKit].deviceType==HDLEZDeviceType_Door) {//为门锁时,只显示麦克风和开门按钮 |
| | | self.captureButton.hidden=YES; |
| | | self.localRecordButton.hidden=YES; |
| | | |
| | | [self.controlButton setTitle:NSLocalizedString(@"device_open", @"开门") forState:UIControlStateNormal]; |
| | | } |
| | | } |
| | | |
| | | - (void)viewDidAppear:(BOOL)animated { |
| | |
| | | } |
| | | } |
| | | |
| | | /** 智能门锁开门token */ |
| | | - (void)player:(EZPlayer *)player playPrivateTokenInfo:(EZPMPlayPrivateTokenInfo *)tokenInfo { |
| | | NSLog(@"开门token--->%@", tokenInfo.token); |
| | | self.streamToken=tokenInfo.token; |
| | | } |
| | | #pragma mark - ValidateCode Methods |
| | | |
| | | - (void)showSetPassword |
| | |
| | | |
| | | - (IBAction)ptzViewShow:(id)sender |
| | | { |
| | | if ([GlobalKit shareKit].deviceType==HDLEZDeviceType_Door) {//为门锁设备时,执行开门 |
| | | NSString *verifyCode = [[GlobalKit shareKit].deviceVerifyCodeBySerial objectForKey:self.deviceInfo.deviceSerial]; |
| | | |
| | | [[EZHttpUtil sharedManager] authLockByHDL:@"123456" deviceId:self.deviceInfo.deviceSerial verifyCode:verifyCode completion:^(ResponseData * _Nonnull responseData) { |
| | | NSLog(@"终端授权结果:%@",responseData.data); |
| | | [[EZHttpUtil sharedManager] remoteOpenByHDL:self.streamToken deviceId:self.deviceInfo.deviceSerial completion:^(ResponseData * _Nonnull responseData) { |
| | | NSLog(@"开门结果:%@",responseData.data); |
| | | }]; |
| | | }]; |
| | | return; |
| | | } |
| | | |
| | | self.ptzView.hidden = NO; |
| | | [self.bottomView bringSubviewToFront:self.ptzView]; |
| | | self.ptzControlButton.alpha = 0; |