chenqiyang
2022-09-02 6a99d9bf65aa5878cb409945ed2bdbdcb916d047
HDLLinPhoneSDK£¨OC£©/HDLLinPhoneSDK/HDLLinPhoneSDK.m
@@ -126,11 +126,11 @@
                UIViewController *topVC=[HDLLinPhoneCommon topMostController];
                if ([topVC isKindOfClass:[HDLLPOnMonitorViewController class]]) {
                    [topVC dismissViewControllerAnimated:NO completion:^{
                        [weakSelf toLinphoneIntercomVC:titleName];
                        [weakSelf toLinphoneIntercomVC:titleName deviceType:HDLLPType_Default userName:@""];
                    }];
                }else if ([topVC isKindOfClass:[HDLLinphoneIntercomVC class]]) {
                    [topVC dismissViewControllerAnimated:NO completion:^{
                        [weakSelf toLinphoneIntercomVC:titleName];
                        [weakSelf toLinphoneIntercomVC:titleName deviceType:HDLLPType_Default userName:@""];
                    }];
                }
            }];
@@ -142,7 +142,7 @@
        return;
    }
    [self toLinphoneIntercomVC:titleName];
    [self toLinphoneIntercomVC:titleName deviceType:HDLLPType_Default userName:@""];
    
//    if (self.presentingIntercomVC) {
//        __weak typeof(self) weakSelf = self;
@@ -170,7 +170,37 @@
//    }];
}
-(void)toLinphoneIntercomVC:(NSString*)titleName{
/**
*  è·³è½¬è‡ªç ”呼叫页面
*
*  @param titleName   æ ‡é¢˜
*/
-(void)gotoHDLSRLinphoneIntercomVC:(NSString*)titleName userName:(NSString*)username{
    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 deviceType:HDLLPType_HDLSR userName:username];
                    }];
                }else if ([topVC isKindOfClass:[HDLLinphoneIntercomVC class]]) {
                    [topVC dismissViewControllerAnimated:NO completion:^{
                        [weakSelf toLinphoneIntercomVC:titleName deviceType:HDLLPType_HDLSR userName:username];
                    }];
                }
            }];
        }
        return;
    }
    [self toLinphoneIntercomVC:titleName  deviceType:HDLLPType_HDLSR userName:username];
}
-(void)toLinphoneIntercomVC:(NSString*)titleName deviceType:(HDLLPType)deviceType userName:(NSString *)userName{
    HDLLinphoneIntercomVC *vc=[[HDLLinphoneIntercomVC alloc]init];
//    vc.CallId=callId;
    vc.hasVideo=YES;
@@ -178,6 +208,8 @@
    if (titleName) {
        vc.titleName=titleName;
    }
    vc.deviceType=deviceType;
    vc.userName=userName;
    vc.modalPresentationStyle = UIModalPresentationFullScreen;
//    self.presentingIntercomVC=vc;
    [[HDLLinPhoneCommon topMostController] presentViewController:vc animated:YES completion:^{