From bf7f42bc3b63a0c2cec5a5adfb44feffab47a077 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期四, 01 四月 2021 15:08:55 +0800 Subject: [PATCH] 2021-04-01 1.更新 --- On+/xamarin/ESVideoOnXamarin/ESVideoOnXamarin/ESOnIntercomViewController.m | 34 ++++++++++++++++++++++++++++++---- 1 files changed, 30 insertions(+), 4 deletions(-) diff --git a/On+/xamarin/ESVideoOnXamarin/ESVideoOnXamarin/ESOnIntercomViewController.m b/On+/xamarin/ESVideoOnXamarin/ESVideoOnXamarin/ESOnIntercomViewController.m index 8286472..4a07cfa 100644 --- a/On+/xamarin/ESVideoOnXamarin/ESVideoOnXamarin/ESOnIntercomViewController.m +++ b/On+/xamarin/ESVideoOnXamarin/ESVideoOnXamarin/ESOnIntercomViewController.m @@ -61,6 +61,7 @@ BOOL isBackGround; BOOL iSVideoNotDetermined; BOOL iSAudioNotDetermined; + BOOL isAnswer;//鏄惁宸茬粡鐐瑰嚮鎺ュ惉杩囦簡 NSString * tipStr; NSString * okStr; @@ -71,6 +72,7 @@ NSString * unlockSuccessfullyStr; NSString * callingStr; NSString * hangUpStr; + NSString * hasBeenHungUpStr; // int openDoorTimeout; //鍏ㄥ眬鍙橀噺 SystemSoundID sound; @@ -110,6 +112,7 @@ hangUpStr = @"鎸傛柇"; unlockSuccessfullyStr = @"寮�閿佹垚鍔�"; callingStr = @"鏉ョ數涓�..."; + hasBeenHungUpStr = @"宸叉寕鏂�"; }else{ tipStr = @"Prompt"; okStr = @"OK"; @@ -120,6 +123,7 @@ hangUpStr = @"Hang up"; unlockSuccessfullyStr = @"Unlock successfully"; callingStr = @"Incoming call"; + hasBeenHungUpStr = @"Has been hung up"; } } @@ -301,6 +305,17 @@ //鎸傛柇鎸夐挳浜嬩欢 -(void)hangUpAction{ + //1.鍥炶皟浜嬩欢 + if(self.mESCallDelegate != NULL){ + if(isAnswer){ + //濡傛灉涔嬪墠宸茬粡鎺ュ惉浜嗭紝鍥炶皟鏄寕鏂� + [self.mESCallDelegate onHangUpAction:_callTimeout]; + }else{ + //濡傛灉涔嬪墠娌℃帴鍚簡锛屽洖璋冩槸鎷掓帴 + [self.mESCallDelegate onRejectCallAction]; + } + } + //2.椤甸潰鍏抽棴 [self backAction]; } @@ -352,6 +367,11 @@ //寮�濮嬭鏃� _callTimeout = 0; [self startCountdown]; + isAnswer = YES; + + if(self.mESCallDelegate != NULL){ + [self.mESCallDelegate onAnswerAction]; + } } @@ -488,8 +508,10 @@ _openDoorTimeout = 0; [self startOpenDoorCountdown]; [self showUIAlertView:unlockSuccessfullyStr]; - - + // 寮�閿佹垚鍔熷洖璋� + if(self.mESCallDelegate != NULL){ + [self.mESCallDelegate onUnlockAction]; + } } -(void)setUnlock:(BOOL)ISEnable{ @@ -739,7 +761,7 @@ // [_mCallOrAccept setTitle:@"閫氳瘽涓�..." forState:UIControlStateNormal]; }else if([phoneEventStr isEqual:@"EVT_HangUp"]){ - [self showUIAlertViewWithBack:@"宸叉寕鏂�"]; + [self showUIAlertViewWithBack:hasBeenHungUpStr]; // [_mCallOrAccept setTitle:@"鍙嶅懠" forState:UIControlStateNormal]; }else if([phoneEventStr isEqual:@"EVT_P2POnlineStatusChanged"]){ //EVT_P2PStarted(p2p鍒濆鍖朞K锛屽彲浠ヨ繛鎺�),EVT_P2POnlineStatusChangedonline=1 @@ -753,7 +775,7 @@ NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil]; NSInteger status = [[dic valueForKey:@"status"]integerValue]; if(status && status == 1){ - NSLog(@"寮�闂ㄦ垚鍔�"); +// NSLog(@"寮�闂ㄦ垚鍔�"); [self setOpenDoorSuccess]; }else{ NSLog(@"寮�闂ㄥけ璐�"); @@ -1110,6 +1132,10 @@ NSString *message = nil; if (!error) { message = saveToTheAlbumsStr; + // 鎴浘鎴愬姛鍥炶皟 + if(self.mESCallDelegate != NULL){ + [self.mESCallDelegate onScreenshotSuccessfulAction:image]; + } } else { -- Gitblit v1.8.0