chenqiyang
2022-09-02 6a99d9bf65aa5878cb409945ed2bdbdcb916d047
HDLLinPhoneSDK£¨OC£©/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m
@@ -357,7 +357,15 @@
    [self stopPlaySystemSound];
    
//    [[HDLCallManager instance] acceptCallByCallID:self.CallId hasVideo:self.hasVideo];
    [[HDLLinphoneManager instance] acceptCall];
    [HDLLinphoneManager.instance enableMicro:true];
    if (self.deviceType==HDLLPType_HDLSR) {
        NSLog(@"反呼");
        [HDLLinphoneManager.instance startCall:self.userName];
    }else{
        NSLog(@"接听");
        [[HDLLinphoneManager instance] acceptCall];
    }
    /// å¼€å¯å¯¹è®²
//    [self startTalk];
    
@@ -475,9 +483,9 @@
/** å¼€å¯å€’计时 */
- (void)startCountdown {
    
    if (_callTimeout > 100) {
        return;
    }
//    if (_callTimeout > 100) {
//        return;
//    }
    _callTimeout = 0;
    // GCD定时器
    dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
@@ -488,24 +496,24 @@
    
    dispatch_source_set_event_handler(_countdownTimer, ^{
        WEAKSELF_AT
        if(weakSelf_AT.callTimeout >= 100 ){// è®¡æ—¶ç»“束
            // å…³é—­å®šæ—¶å™¨
            dispatch_source_cancel(weakSelf_AT.countdownTimer);
            dispatch_async(dispatch_get_main_queue(), ^{
                NSLog(@"超时");
                [weakSelf_AT backAction];
            });
        }else{// è®¡æ—¶ä¸­
//        if(weakSelf_AT.callTimeout >= 100 ){// è®¡æ—¶ç»“束
//            // å…³é—­å®šæ—¶å™¨
//            dispatch_source_cancel(weakSelf_AT.countdownTimer);
//
//            dispatch_async(dispatch_get_main_queue(), ^{
//                NSLog(@"超时");
//                [weakSelf_AT backAction];
//
//            });
//
//        }else{// è®¡æ—¶ä¸­
            weakSelf_AT.callTimeout++;
            dispatch_async(dispatch_get_main_queue(), ^{
                [weakSelf_AT ShowTime:weakSelf_AT.callTimeout];
            });
            
            
        }
//        }
    });
    
    // å¼€å¯å®šæ—¶å™¨