From be56723cce4cd60ddc144ebe6ac20607675b3006 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期三, 17 七月 2024 09:33:38 +0800 Subject: [PATCH] 更新sdk --- HDLLinPhoneSDK(OC)/HDLLinPhoneSDK/HDLLinPhoneSDK.m | 69 ++++++++++++++++++++++++++++++++-- 1 files changed, 64 insertions(+), 5 deletions(-) diff --git "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinPhoneSDK.m" "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinPhoneSDK.m" index b0c8eed..e6d66dc 100644 --- "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinPhoneSDK.m" +++ "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinPhoneSDK.m" @@ -43,7 +43,6 @@ } -(void)login:(NSString*)username password:(NSString*)pwd domain:(NSString*) domain{ - NSLog(@"sipDomain:%@",domain); [HDLLinphoneManager.instance login:username password:pwd domain:domain]; } @@ -101,12 +100,37 @@ vc.modalPresentationStyle = UIModalPresentationFullScreen; vc.userName=username; vc.titleName=title; + [HDLLinphoneManager instance].deviceType=HDLLPType_Default; + [HDLLinphoneManager instance].isResettingVideoEnable=NO; // self.CallVC=vc; [[HDLLinPhoneCommon topMostController] presentViewController:vc animated:YES completion:^{ }]; } + +/** +* 鍛煎彨锛堣嚜鐮斿彲瑙嗗璁诧級 +* +* @param username 鐢ㄦ埛璐﹀彿 +* @param title 椤甸潰鏍囬 +*/ +-(void)callHDLSRWithUserName:(NSString*)username title:(NSString *)title{ + HDLLPOnMonitorViewController *vc=[[HDLLPOnMonitorViewController alloc]init]; +// vc.CallId=callId; +// vc.hasVideo=YES; + vc.hdlLinphoneCallDelegate=self.hdlLinphoneCallDelegate; + vc.modalPresentationStyle = UIModalPresentationFullScreen; + vc.userName=username; + vc.titleName=title; + [HDLLinphoneManager instance].deviceType=HDLLPType_HDLSR; + [HDLLinphoneManager instance].isResettingVideoEnable=NO; +// self.CallVC=vc; + [[HDLLinPhoneCommon topMostController] presentViewController:vc animated:YES completion:^{ + + }]; +} + /** * 璺宠浆鍛煎彨椤甸潰 * @@ -127,11 +151,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:@""]; }]; } }]; @@ -143,7 +167,7 @@ return; } - [self toLinphoneIntercomVC:titleName]; + [self toLinphoneIntercomVC:titleName deviceType:HDLLPType_Default userName:@""]; // if (self.presentingIntercomVC) { // __weak typeof(self) weakSelf = self; @@ -171,7 +195,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; @@ -179,7 +233,12 @@ if (titleName) { vc.titleName=titleName; } + vc.deviceType=deviceType; + vc.userName=userName; vc.modalPresentationStyle = UIModalPresentationFullScreen; + + [HDLLinphoneManager instance].deviceType=deviceType; + [HDLLinphoneManager instance].isResettingVideoEnable=NO; // self.presentingIntercomVC=vc; [[HDLLinPhoneCommon topMostController] presentViewController:vc animated:YES completion:^{ -- Gitblit v1.8.0