From 4c1abca185a5727da6fb314a0cb4cd44bfe1b3bf Mon Sep 17 00:00:00 2001
From: Davin <591807572@qq.com>
Date: 星期五, 07 六月 2024 17:48:47 +0800
Subject: [PATCH] feature appkey修改
---
EZSDK/EZSDK/EZ/UIViewControllers/EZLivePlayViewController.m | 184 +++++++++++++++++++++++++++++++++++-----------
1 files changed, 140 insertions(+), 44 deletions(-)
diff --git a/EZSDK/EZSDK/EZ/UIViewControllers/EZLivePlayViewController.m b/EZSDK/EZSDK/EZ/UIViewControllers/EZLivePlayViewController.m
index 155f7c6..295632f 100644
--- a/EZSDK/EZSDK/EZ/UIViewControllers/EZLivePlayViewController.m
+++ b/EZSDK/EZSDK/EZ/UIViewControllers/EZLivePlayViewController.m
@@ -39,6 +39,7 @@
@property (nonatomic) BOOL isOpenSound;
@property (nonatomic) BOOL isPlaying;
+@property (nonatomic) BOOL isAnswering; // 姝e湪鎺ュ惉涓�
@property (nonatomic, strong) NSTimer *recordTimer;
@property (nonatomic) NSTimeInterval seconds;
@property (nonatomic, strong) CALayer *orangeLayer;
@@ -60,12 +61,16 @@
@property (nonatomic, weak) IBOutlet UIButton *captureButton;
@property (nonatomic, weak) IBOutlet UIButton *localRecordButton;
@property (nonatomic, weak) IBOutlet UIButton *playButton;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *playBtnLeftMargin;
@property (weak, nonatomic) IBOutlet UIButton *streamPlayBtn;
@property (nonatomic, weak) IBOutlet UIButton *voiceButton;
@property (nonatomic, weak) IBOutlet UIButton *qualityButton;
@property (nonatomic, weak) IBOutlet UIButton *emptyButton;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *emptyBtnLeftMargin;
@property (nonatomic, weak) IBOutlet UIButton *largeButton;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *largeBtnRightMargin;
@property (nonatomic, weak) IBOutlet UIButton *largeBackButton;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *largeBackBtnLeftMargin;
@property (nonatomic, weak) IBOutlet UIView *ptzView;
@property (nonatomic, weak) IBOutlet UIButton *ptzCloseButton;
@property (nonatomic, weak) IBOutlet UIButton *ptzControlButton;
@@ -132,6 +137,7 @@
self.isStartingTalk = NO;
self.ptzView.hidden = YES;
self.talkView.hidden = YES;
+ self.isAnswering = NO;
self.videoCallOutView.hidden = YES;
self.doorPlayerAspectRatio = HDLEZ_APP_SCREEN_WIDTH / HDLEZ_APP_SCREEN_HEIGHT;
_landscape = NO;
@@ -143,6 +149,7 @@
//鍒濆鍖栫浉鍏虫暟鎹�
[self initialData];
+ [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:HDLEZHEXCOLOR(0x1B2D4D, 1.),NSFontAttributeName:[UIFont systemFontOfSize:18]}];
// self.talkButton.enabled = self.deviceInfo.isSupportTalk;
// self.controlButton.enabled = self.deviceInfo.isSupportPTZ;
@@ -277,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
@@ -290,15 +305,16 @@
//缁撴潫鏈湴褰曞儚
if(self.localRecordButton.selected)
{
+ __weak __typeof(self)weakSelf = self;
[_player stopLocalRecordExt:^(BOOL ret) {
NSLog(@"%d", ret);
- [_recordTimer invalidate];
- _recordTimer = nil;
- self.localRecordLabel.hidden = YES;
- [self saveRecordToPhotosAlbum:_filePath];
- _filePath = nil;
+ [weakSelf.recordTimer invalidate];
+ weakSelf.recordTimer = nil;
+ weakSelf.localRecordLabel.hidden = YES;
+ [weakSelf saveRecordToPhotosAlbum:weakSelf.filePath];
+ weakSelf.filePath = nil;
}];
}
@@ -351,8 +367,7 @@
self.captureButton.enabled = NO;
self.localRecordButton.enabled = NO;
self.streamPlayBtn.hidden = YES;
- self.isShowAlert = YES;
- NSLog(@"#####鍒濆鍖栨柟娉曞睍绀�");
+// self.isShowAlert = YES;
if (_url)
{
@@ -383,9 +398,9 @@
[self.qualityButton setTitle:NSLocalizedString(@"device_quality_low",@"娴佺晠") forState:UIControlStateNormal];
}
}
-#warning 涓嶆敮鎸佸垏鎹㈡竻鏅板害锛屽叏灞忔椂涔熼渶瑕佷富鎸�
if (_cameraInfo.cameraNo == 0 || [self.deviceInfo.deviceType containsString:@"CAS"]) { //涓嶆敮鎸佹竻鏅板害鍒囨崲
self.qualityButton.hidden = YES;
+ [self.fullSceneToolView supportVideoLevelChange:NO];
}
if (self.deviceInfo.cameraInfo.count > 1) {
@@ -401,8 +416,9 @@
if (!_url)
{
//鎶撳浘鎺ュ彛婕旂ず浠g爜
+ __weak __typeof(self)weakSelf = self;
[EZOPENSDK captureCamera:_cameraInfo.deviceSerial cameraNo:_cameraInfo.cameraNo completion:^(NSString *url, NSError *error) {
- NSLog(@"[%@] capture cameraNo is [%d] url is %@, error is %@", _cameraInfo.deviceSerial, (int)_cameraInfo.cameraNo, url, error);
+ NSLog(@"[%@] capture cameraNo is [%d] url is %@, error is %@", weakSelf.cameraInfo.deviceSerial, (int)weakSelf.cameraInfo.cameraNo, url, error);
}];
}
#endif
@@ -493,21 +509,33 @@
[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.;
// 闂ㄩ攣鍏ㄥ睆鐘舵�佷笅宸ュ叿鏍�
[self.view addSubview:self.fullSceneToolView];
- __weak EZLivePlayViewController *weakSelf = self;
- [self.fullSceneToolView configPlayStatus:YES soundOn:YES videoLevel:1 toolOperation:^(HDLEZVideoFullSceneOperation operationType) {
+ __weak __typeof(self)weakSelf = self;
+ [self.fullSceneToolView ringRingRing:YES]; // 榛樿鏄剧ず鎸傛柇鎸夐挳
+ [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) {
@@ -600,12 +628,22 @@
[self.scrollView setTranslatesAutoresizingMaskIntoConstraints:NO];
[self.toolBar setTranslatesAutoresizingMaskIntoConstraints:NO];
- [NSLayoutConstraint deactivateConstraints:@[self.scrollViewWHRatio]];
+ [self.playButton setTranslatesAutoresizingMaskIntoConstraints:NO];
+ [self.emptyButton setTranslatesAutoresizingMaskIntoConstraints:NO];
+ [self.largeButton setTranslatesAutoresizingMaskIntoConstraints:NO];
+// [self.largeBackButton setTranslatesAutoresizingMaskIntoConstraints:NO];
+ [NSLayoutConstraint deactivateConstraints:@[self.scrollViewWHRatio, self.playBtnLeftMargin, self.emptyBtnLeftMargin, self.largeBtnRightMargin]];
self.scrollViewWHRatio = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.scrollView attribute:NSLayoutAttributeHeight multiplier:16/9. constant:0];
- [NSLayoutConstraint activateConstraints:@[self.scrollViewWHRatio]];
+ self.playBtnLeftMargin = [NSLayoutConstraint constraintWithItem:self.playButton attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.toolBar attribute:NSLayoutAttributeLeading multiplier:1 constant:0];
+ self.emptyBtnLeftMargin = [NSLayoutConstraint constraintWithItem:self.emptyButton attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.qualityButton attribute:NSLayoutAttributeTrailing multiplier:1 constant:0];
+ self.largeBtnRightMargin = [NSLayoutConstraint constraintWithItem:self.toolBar attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:self.largeButton attribute:NSLayoutAttributeTrailing multiplier:1 constant:0];
+ [NSLayoutConstraint activateConstraints:@[self.scrollViewWHRatio, self.playBtnLeftMargin, self.emptyBtnLeftMargin, self.largeBtnRightMargin]];
dispatch_async(dispatch_get_main_queue(), ^{
[self.scrollView layoutIfNeeded];
[self.toolBar layoutIfNeeded];
+ [self.playButton layoutIfNeeded];
+ [self.emptyButton layoutIfNeeded];
+ [self.largeButton layoutIfNeeded];
});
if(toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
@@ -620,16 +658,25 @@
CGFloat tureScreenW = HDLEZ_APP_SCREEN_WIDTH > HDLEZ_APP_SCREEN_HEIGHT ? HDLEZ_APP_SCREEN_HEIGHT : HDLEZ_APP_SCREEN_WIDTH;
CGFloat tureScreenH = HDLEZ_APP_SCREEN_WIDTH < HDLEZ_APP_SCREEN_HEIGHT ? HDLEZ_APP_SCREEN_HEIGHT : HDLEZ_APP_SCREEN_WIDTH;
-
+ CGFloat marginSpace = 64;
[self.scrollView setTranslatesAutoresizingMaskIntoConstraints:NO];
[self.toolBar setTranslatesAutoresizingMaskIntoConstraints:NO];
- [NSLayoutConstraint deactivateConstraints:@[self.scrollViewWHRatio]];
+ [self.playButton setTranslatesAutoresizingMaskIntoConstraints:NO];
+ [self.emptyButton setTranslatesAutoresizingMaskIntoConstraints:NO];
+ [self.largeButton setTranslatesAutoresizingMaskIntoConstraints:NO];
+ [NSLayoutConstraint deactivateConstraints:@[self.scrollViewWHRatio, self.playBtnLeftMargin, self.emptyBtnLeftMargin, self.largeBtnRightMargin]];
self.scrollViewWHRatio = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.scrollView attribute:NSLayoutAttributeHeight multiplier:tureScreenH/(tureScreenW - 37) constant:0];
- [NSLayoutConstraint activateConstraints:@[self.scrollViewWHRatio]];
+ self.playBtnLeftMargin = [NSLayoutConstraint constraintWithItem:self.playButton attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.toolBar attribute:NSLayoutAttributeLeading multiplier:1 constant:marginSpace];
+ self.emptyBtnLeftMargin = [NSLayoutConstraint constraintWithItem:self.emptyButton attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.qualityButton attribute:NSLayoutAttributeTrailing multiplier:1 constant:(tureScreenH - tureScreenW - 2 * marginSpace)];
+ self.largeBtnRightMargin = [NSLayoutConstraint constraintWithItem:self.toolBar attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:self.largeButton attribute:NSLayoutAttributeTrailing multiplier:1 constant:marginSpace];
+ [NSLayoutConstraint activateConstraints:@[self.scrollViewWHRatio, self.playBtnLeftMargin, self.emptyBtnLeftMargin, self.largeBtnRightMargin]];
dispatch_async(dispatch_get_main_queue(), ^{
[self.scrollView layoutIfNeeded];
[self.toolBar layoutIfNeeded];
+ [self.playButton layoutIfNeeded];
+ [self.emptyButton layoutIfNeeded];
+ [self.largeButton layoutIfNeeded];
});
}
}
@@ -699,7 +746,7 @@
// HDLEZLog(@"楂橈細%ld",(long)playerVH);
CGFloat ratio=((CGFloat)width)/((CGFloat)height);
NSLog(@"姣斾緥锛�%f",ratio);
- CGFloat playerVW=playerVH*ratio;
+// CGFloat playerVW=playerVH*ratio;
self.doorPlayerAspectRatio = ratio;
// HDLEZLog(@"瀹斤細%ld",(long)playerVW);
[self.doorPlayerView mas_updateConstraints:^(MASConstraintMaker *make) {
@@ -836,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;
}
}
@@ -900,6 +951,7 @@
- (IBAction)large:(id)sender
{
+ if (!self.isPlaying)return; // 鏈挱鏀剧姝㈠叏灞忥紝
self.videoCallOutView.hidden = YES;
if (_landscape == YES) {
[self largeBack:self.largeBackButton];
@@ -918,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];
@@ -955,6 +1007,10 @@
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeLeft];
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
}
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+ [self.largeButton setImage:[UIImage imageNamed:@"preview_enlarge_full"] forState:UIControlStateNormal];
+ [self.largeButton setImage:[UIImage imageNamed:@"preview_enlarge_full_btn_sel"] forState:UIControlStateHighlighted];
+ });
}
- (IBAction)largeBack:(id)sender
@@ -1007,6 +1063,10 @@
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationPortrait];
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
}
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+ [self.largeButton setImage:[UIImage imageNamed:@"preview_enlarge"] forState:UIControlStateNormal];
+ [self.largeButton setImage:[UIImage imageNamed:@"preview_enlarge_btn_sel"] forState:UIControlStateHighlighted];
+ });
}
- (IBAction)capture:(id)sender
@@ -1301,6 +1361,7 @@
self.speakImageView.alpha = 0;
self.talkView.hidden = YES;
}];
+ self.isAnswering = NO;
}
- (IBAction)localButtonClicked:(id)sender
@@ -1308,15 +1369,16 @@
//缁撴潫鏈湴褰曞儚
if(self.localRecordButton.selected)
{
+ __weak __typeof(self)weakSelf = self;
[_player stopLocalRecordExt:^(BOOL ret) {
NSLog(@"%d", ret);
- [_recordTimer invalidate];
- _recordTimer = nil;
- self.localRecordLabel.hidden = YES;
- [self saveRecordToPhotosAlbum:_filePath];
- _filePath = nil;
+ [weakSelf.recordTimer invalidate];
+ weakSelf.recordTimer = nil;
+ weakSelf.localRecordLabel.hidden = YES;
+ [weakSelf saveRecordToPhotosAlbum:weakSelf.filePath];
+ weakSelf.filePath = nil;
}];
}
else
@@ -1396,19 +1458,32 @@
}
- (IBAction)clickCalloutHangupAction:(id)sender {
- [UIView dd_showMessage:@"鎸傛柇寮�鍙戜腑..."];
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 {
- [UIView dd_showMessage:@"蹇界暐寮�鍙戜腑..."];
+// [UIView dd_showMessage:@"蹇界暐寮�鍙戜腑..."];
self.isShowAlert = NO;
+ self.isAnswering = NO;
+ [self.navigationController popViewControllerAnimated:YES];
}
- (IBAction)clickCalloutAnswerAction:(id)sender {
- [UIView dd_showMessage:@"鎺ュ惉寮�鍙戜腑..."];
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]);
+ }];
+ }
}
@@ -1416,15 +1491,11 @@
/// 灞曠ず鍛煎彨寮规
- (void)showCallOutAlertView {
self.videoCallOutView.hidden = NO;
- [UIView dd_showMessage:@"灞曠ず鍛煎彨寮规"];
- NSLog(@"灞曠ず鍛煎彨寮规");
}
/// 闅愯棌鍛煎彨寮规
- (void)hiddenCallOutAlertView {
self.videoCallOutView.hidden = YES;
- [UIView dd_showMessage:@"闅愯棌鍛煎彨寮规"];
- NSLog(@"闅愯棌鍛煎彨寮规");
}
#pragma mark - Private Methods
@@ -1545,8 +1616,8 @@
[view removeFromSuperview];
}
}
- CGFloat averageWidth = [UIScreen mainScreen].bounds.size.width/5.0;
- UIImageView *lineImageView1 = [UIView dd_instanceVerticalLine:20 color:[UIColor grayColor]];
+// CGFloat averageWidth = [UIScreen mainScreen].bounds.size.width/5.0;
+ UIImageView *lineImageView1 = [UIView dd_instanceVerticalLine:20 color:HDLEZHEXCOLOR(0xFFFFFF, 0.16)];
// lineImageView1.frame = CGRectMake(averageWidth, 7, lineImageView1.frame.size.width, lineImageView1.frame.size.height);
[self.toolBar addSubview:lineImageView1];
[lineImageView1 mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -1555,7 +1626,7 @@
make.width.mas_equalTo(lineImageView1.frame.size.width);
make.height.mas_equalTo(lineImageView1.frame.size.height);
}];
- UIImageView *lineImageView2 = [UIView dd_instanceVerticalLine:20 color:[UIColor grayColor]];
+ UIImageView *lineImageView2 = [UIView dd_instanceVerticalLine:20 color:HDLEZHEXCOLOR(0xFFFFFF, 0.16)];
// lineImageView2.frame = CGRectMake(averageWidth * 2, 7, lineImageView2.frame.size.width, lineImageView2.frame.size.height);
[self.toolBar addSubview:lineImageView2];
[lineImageView2 mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -1564,7 +1635,7 @@
make.width.mas_equalTo(lineImageView2.frame.size.width);
make.height.mas_equalTo(lineImageView2.frame.size.height);
}];
- UIImageView *lineImageView3 = [UIView dd_instanceVerticalLine:20 color:[UIColor grayColor]];
+ UIImageView *lineImageView3 = [UIView dd_instanceVerticalLine:20 color:HDLEZHEXCOLOR(0xFFFFFF, 0.16)];
// lineImageView3.frame = CGRectMake(averageWidth * 3, 7, lineImageView3.frame.size.width, lineImageView3.frame.size.height);
[self.toolBar addSubview:lineImageView3];
[lineImageView3 mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -1573,7 +1644,7 @@
make.width.mas_equalTo(lineImageView3.frame.size.width);
make.height.mas_equalTo(lineImageView3.frame.size.height);
}];
- UIImageView *lineImageView4 = [UIView dd_instanceVerticalLine:20 color:[UIColor grayColor]];
+ UIImageView *lineImageView4 = [UIView dd_instanceVerticalLine:20 color:HDLEZHEXCOLOR(0xFFFFFF, 0.16)];
// lineImageView4.frame = CGRectMake(averageWidth * 4, 7, lineImageView4.frame.size.width, lineImageView4.frame.size.height);
[self.toolBar addSubview:lineImageView4];
[lineImageView4 mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -1686,7 +1757,10 @@
- (void)doorLockFullSceneOperation:(HDLEZVideoFullSceneOperation)operation {
switch (operation) {
case HDLEZVideoFullSceneOperationOfHangUp: { // 鎸傛柇
+ [self largeBack:self.largeButton];
+ [self closeTalkView:self.talkCloseButton];
[self hiddenCallOutAlertView];
+ [self.navigationController popViewControllerAnimated:YES];
}
break;
case HDLEZVideoFullSceneOperationOfPlay: { // 鎾斁
@@ -1698,13 +1772,11 @@
}
break;
case HDLEZVideoFullSceneOperationOfSound: { // 寮�鍚煶閲�
- [_player openSound];
- NSLog(@"#######寮�鍚煶閲�");
+ [self voiceButtonClicked:self.voiceButton];
}
break;
case HDLEZVideoFullSceneOperationOfSoundOff: { // 闈欓煶
- [_player closeSound];
- NSLog(@"#######闈欓煶");
+ [self voiceButtonClicked:self.voiceButton];
}
break;
case HDLEZVideoFullSceneOperationOfSmooth: { // 娴佺晠
@@ -1728,14 +1800,18 @@
}
}
+- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
+ if (!self.fullSceneToolView.hidden) {
+ [self.fullSceneToolView qualityStatusChanged:YES];
+ }
+}
+
#pragma Setter
- (void)setIsShowAlert:(BOOL)isShowAlert {
_isShowAlert = isShowAlert;
- if (isShowAlert) {
- NSLog(@"#####set鏂规硶灞曠ず");
+ if (_isShowAlert) {
[self showCallOutAlertView];
} else {
- NSLog(@"#####set鏂规硶闅愯棌");
[self hiddenCallOutAlertView];
}
}
@@ -1753,4 +1829,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
--
Gitblit v1.8.0