| | |
| | | #import "HDLLPOnMonitorViewController.h" |
| | | |
| | | @interface HDLLinPhoneSDK() |
| | | |
| | | @property (strong, nonatomic) HDLLinphoneIntercomVC* presentingIntercomVC;//å½åå±ç¤ºçæ¥ç¹æ§å¶å¨ï¼ç¨äºåæ¾æ£å¨å±ç¤ºçæ¥ç¹æ§å¶å¨ï¼é¿å
éå¤å¼¹åºçé¢ |
| | | @end |
| | | |
| | | @implementation HDLLinPhoneSDK |
| | |
| | | if (state == LinphoneCallIncomingReceived) { |
| | | [self.hdlLinphoneCallDelegate onIncomingCall:userName]; |
| | | if(self.IsAutoJumpCallView){ |
| | | // NSString *callId=[NSString stringWithFormat:@"%@",[notif.userInfo objectForKey:@"callID"]]; |
| | | // BOOL hasVideo=(BOOL)[notif.userInfo objectForKey:@"hasVideo"]; |
| | | |
| | | |
| | | HDLLinphoneIntercomVC *vc=[[HDLLinphoneIntercomVC alloc]init]; |
| | | // vc.CallId=callId; |
| | | vc.hasVideo=YES; |
| | | vc.hdlLinphoneCallDelegate=self.hdlLinphoneCallDelegate; |
| | | vc.modalPresentationStyle = UIModalPresentationFullScreen; |
| | | // self.IntercomVC=vc; |
| | | [[HDLLinPhoneCommon topMostController] presentViewController:vc animated:YES completion:^{ |
| | | // HDLLinphoneIntercomVC *vc=[[HDLLinphoneIntercomVC alloc]init]; |
| | | //// vc.CallId=callId; |
| | | // vc.hasVideo=YES; |
| | | // vc.hdlLinphoneCallDelegate=self.hdlLinphoneCallDelegate; |
| | | // vc.modalPresentationStyle = UIModalPresentationFullScreen; |
| | | //// self.IntercomVC=vc; |
| | | // [[HDLLinPhoneCommon topMostController] presentViewController:vc animated:YES completion:^{ |
| | | // |
| | | // }]; |
| | | |
| | | }]; |
| | | [self gotoHDLLinphoneIntercomVC:nil]; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | // NSString *callId=[NSString stringWithFormat:@"%@",[notif.userInfo objectForKey:@"callID"]]; |
| | | // BOOL hasVideo=(BOOL)[notif.userInfo objectForKey:@"hasVideo"]; |
| | | // NSLog(@"é¡¶å±è§å¾ï¼%@",[HDLLinPhoneCommon topMostController]); |
| | | |
| | | if ([HDLLinPhoneCommon rootPresentVCContent:[HDLLinphoneIntercomVC class]]||[HDLLinPhoneCommon rootPresentVCContent:[HDLLPOnMonitorViewController class]]) { |
| | | if ([[HDLLinPhoneCommon topMostController] isKindOfClass:[UIAlertController class]]) { |
| | | NSLog(@"é¡¶å±è§å¾æ¯è§é¢éè¯é¡µ"); |
| | | __weak typeof(self) weakSelf = self; |
| | | |
| | | [[HDLLinPhoneCommon topMostController] dismissViewControllerAnimated:NO completion:^{ |
| | | UIViewController *topVC=[HDLLinPhoneCommon topMostController]; |
| | | if ([topVC isKindOfClass:[HDLLPOnMonitorViewController class]]) { |
| | | [topVC dismissViewControllerAnimated:NO completion:^{ |
| | | [weakSelf toLinphoneIntercomVC:titleName]; |
| | | }]; |
| | | }else if ([topVC isKindOfClass:[HDLLinphoneIntercomVC class]]) { |
| | | [topVC dismissViewControllerAnimated:NO completion:^{ |
| | | [weakSelf toLinphoneIntercomVC:titleName]; |
| | | }]; |
| | | } |
| | | }]; |
| | | } |
| | | // UIViewController *topVC=[HDLLinPhoneCommon topMostController]; |
| | | // if ([topVC isKindOfClass:[HDLLinphoneIntercomVC class]]) { |
| | | // [topVC dismissViewControllerAnimated:NO completion:nil]; |
| | | // } |
| | | return; |
| | | } |
| | | |
| | | [self toLinphoneIntercomVC:titleName]; |
| | | |
| | | // if (self.presentingIntercomVC) { |
| | | // __weak typeof(self) weakSelf = self; |
| | | // [self.presentingIntercomVC dismissViewControllerAnimated:NO completion:^{ |
| | | // NSLog(@"页é¢éåºäº"); |
| | | // weakSelf.presentingIntercomVC=nil; |
| | | // [weakSelf toLinphoneIntercomVC:titleName]; |
| | | // }]; |
| | | // |
| | | // return; |
| | | // } |
| | | // NSLog(@"æ§è¡å°æäº"); |
| | | // [self toLinphoneIntercomVC:titleName]; |
| | | // HDLLinphoneIntercomVC *vc=[[HDLLinphoneIntercomVC alloc]init]; |
| | | //// vc.CallId=callId; |
| | | // vc.hasVideo=YES; |
| | | // vc.hdlLinphoneCallDelegate=self.hdlLinphoneCallDelegate; |
| | | // if (titleName) { |
| | | // vc.titleName=titleName; |
| | | // } |
| | | // vc.modalPresentationStyle = UIModalPresentationFullScreen; |
| | | // self.presentingIntercomVC=vc; |
| | | // [[HDLLinPhoneCommon topMostController] presentViewController:vc animated:YES completion:^{ |
| | | // |
| | | // }]; |
| | | } |
| | | |
| | | -(void)toLinphoneIntercomVC:(NSString*)titleName{ |
| | | HDLLinphoneIntercomVC *vc=[[HDLLinphoneIntercomVC alloc]init]; |
| | | // vc.CallId=callId; |
| | | vc.hasVideo=YES; |
| | | vc.hdlLinphoneCallDelegate=self.hdlLinphoneCallDelegate; |
| | | vc.titleName=titleName; |
| | | if (titleName) { |
| | | vc.titleName=titleName; |
| | | } |
| | | vc.modalPresentationStyle = UIModalPresentationFullScreen; |
| | | // self.IntercomVC=vc; |
| | | // self.presentingIntercomVC=vc; |
| | | [[HDLLinPhoneCommon topMostController] presentViewController:vc animated:YES completion:^{ |
| | | |
| | | |
| | | }]; |
| | | } |
| | | |