chenqiyang
2024-07-17 be56723cce4cd60ddc144ebe6ac20607675b3006
HDLLinPhoneSDK£¨OC£©/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m
@@ -53,6 +53,11 @@
    NSString * callingStr;
    NSString * hangUpStr;
    NSString * endOfCallStr;
    NSString * cancelStr;
    NSString * tipMsgStr;
    //    int openDoorTimeout;
    //全局变量
    SystemSoundID sound;
@@ -121,6 +126,8 @@
        unlockSuccessfullyStr = @"开锁成功";
        callingStr = @"来电中...";
        endOfCallStr = @"通话结束";
        cancelStr = @"取消";
        tipMsgStr = @"确定开锁吗?";
    }else{
        tipStr = @"Prompt";
        okStr = @"OK";
@@ -132,6 +139,8 @@
        unlockSuccessfullyStr = @"Unlock successfully";
        callingStr = @"Incoming call";
        endOfCallStr = @"End of call";
        cancelStr = @"Cancel";
        tipMsgStr = @"Are you sure to unlock?";
        
    }
}
@@ -219,7 +228,8 @@
-(UIView *)videoView{
    if (_videoView == Nil) {
        _videoView =  [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, GetRealWidth(210))];
        _videoView.backgroundColor = UIColor.lightGrayColor;
//        _videoView.backgroundColor = UIColor.lightGrayColor;
        _videoView.backgroundColor = UIColor.blackColor;
        _videoView.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.25].CGColor;
        _videoView.layer.shadowOffset = CGSizeMake(0,0.5);
        _videoView.layer.shadowOpacity = 1;
@@ -290,7 +300,27 @@
    [_unlockImgBtn setImage:[UIImage imageNamed:@"ic_esvideo_on_unlock_unselect"] forState:UIControlStateNormal];
    //开锁
    if(self.hdlLinphoneCallDelegate != NULL){
        [self.hdlLinphoneCallDelegate onUnlockAction];
        UIAlertController *alertController = [UIAlertController alertControllerWithTitle:tipStr message:tipMsgStr preferredStyle:UIAlertControllerStyleAlert];
        // æ·»åŠ å–æ¶ˆæŒ‰é’®
        UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelStr style:UIAlertActionStyleCancel handler:nil];
        [alertController addAction:cancelAction];
        // æ·»åŠ ç¡®è®¤æŒ‰é’®
        WEAKSELF_AT
        UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:okStr  style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
            [weakSelf_AT.hdlLinphoneCallDelegate onUnlockAction];
        }];
        [alertController addAction:confirmAction];
        // èŽ·å–å½“å‰è§†å›¾æŽ§åˆ¶å™¨
        UIViewController *currentViewController = [UIApplication sharedApplication].keyWindow.rootViewController;
        // æ˜¾ç¤ºå¼¹çª—
        [self presentViewController:alertController animated:YES completion:nil];
    }
}