iOS10 视频通话报错:Thread 1: EXC_BAD_ACCESS(code=1,address=0x50)
SDK 3.2.0
iOS 8.1 没有问题
报错地点在 callSession.localVideoView = * 这里。代码如下:
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
EMError *error = [[EMClient sharedClient] loginWithUsername:@"zhiquan" password:@"123456"];
if (!error) {
NSLog(@"登录成功");
[[EMClient sharedClient].callManager startVideoCall:@"changlin" completion:^(EMCallSession *callSession, EMError *error) {
if (!error) {
//1.对方窗口
callSession.remoteVideoView = [[EMCallRemoteView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
[self.view addSubview:callSession.remoteVideoView];
//2.自己窗口
CGFloat width = 80;
CGFloat height = self.view.frame.size.height / self.view.frame.size.width * width;
callSession.localVideoView = [[EMCallLocalView alloc] initWithFrame:CGRectMake(self.view.frame.size.width - 90, 100, width, height)];
[self.view addSubview:callSession.localVideoView];
} else {
NSLog(@"startVideoCall error is @%", error);
}
}];
} else {
NSLog(@"登录失败,error is @%", error);
}
}
没有找到相关结果
已邀请:
2 个回复
[已注销]
zhiquan