//
|
// EZHubDebugViewController.m
|
// EZOpenSDKDemo
|
//
|
// Created by yuqian on 2020/5/18.
|
// Copyright © 2020 hikvision. All rights reserved.
|
//
|
|
#import "EZHubDebugViewController.h"
|
#import "EZPlaybackViewController.h"
|
#import "EZLivePlayViewController.h"
|
|
@interface EZHubDebugViewController ()
|
@property (weak, nonatomic) IBOutlet UITextField *deviceSerial;
|
@property (weak, nonatomic) IBOutlet UITextField *channelNo;
|
@property (weak, nonatomic) IBOutlet UIButton *nextBtn;
|
|
@end
|
|
@implementation EZHubDebugViewController
|
|
- (void)viewDidLoad {
|
[super viewDidLoad];
|
// self.deviceSerial.text = [NSString stringWithFormat:@"%@-test123123", _deviceInfo.deviceSerial];
|
self.deviceSerial.text = [NSString stringWithFormat:@"ZPFTESTCAS1:test011-test123123"];
|
}
|
|
- (void)viewWillAppear:(BOOL)animated
|
{
|
[super viewWillAppear:animated];
|
|
switch (_playType) {
|
case 1:
|
[self.nextBtn setTitle:@"跳转进行预览" forState:UIControlStateNormal];
|
break;
|
case 2:
|
[self.nextBtn setTitle:@"跳转进行回放" forState:UIControlStateNormal];
|
break;
|
default:
|
break;
|
}
|
}
|
|
- (IBAction)clickNextBtn:(id)sender {
|
|
switch (_playType) {
|
case 1:
|
{
|
EZLivePlayViewController *vc = [[UIStoryboard storyboardWithName:@"EZMain" bundle:nil] instantiateViewControllerWithIdentifier:@"EZLivePlayViewController"];
|
vc.deviceInfo = _deviceInfo;
|
vc.hubCoDevSerial = self.deviceSerial.text;
|
vc.cameraIndex = [self.channelNo.text intValue];
|
[self.navigationController pushViewController:vc animated:YES];
|
}
|
break;
|
case 2:
|
{
|
EZPlaybackViewController *vc = [[UIStoryboard storyboardWithName:@"EZMain" bundle:nil] instantiateViewControllerWithIdentifier:@"EZPlaybackViewController"];
|
vc.deviceInfo = _deviceInfo;
|
vc.hubCoDevSerial = self.deviceSerial.text;
|
vc.cameraIndex = [self.channelNo.text intValue];
|
[self.navigationController pushViewController:vc animated:YES];
|
}
|
break;
|
default:
|
break;
|
}
|
}
|
|
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
{
|
[[UIApplication sharedApplication] sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil];
|
}
|
|
@end
|