不调用Quickblox webrtc视频通话接收方法

时间:2016-09-13 05:11:01

标签: ios objective-c iphone quickblox

没有调用Quickblox webrtc视频通话接收方法。我打电话给他接受电话的人,我们可以通信但是当他打电话给我时我不打算接听电话。 `

- (void)didReceiveNewSession:(QBRTCSession *)session userInfo:(NSDictionary *)userInfo {

if (self.session ) {

    [session rejectCall:@{@"reject" : @"busy"}];
    return;
}

self.session = session;

[QBRTCSoundRouter.instance initialize];

NSParameterAssert(!self.nav);

IncomingCallViewController *incomingViewController =
[self.storyboard instantiateViewControllerWithIdentifier:@"IncomingCallViewController"];
incomingViewController.delegate = self;
incomingViewController.session = session;
incomingViewController.usersDatasource = self.dataSource;

self.nav = [[UINavigationController alloc] initWithRootViewController:incomingViewController];
[self presentViewController:self.nav animated:NO completion:nil];
 }

1 个答案:

答案 0 :(得分:1)

Quickblox webrtc视频通话接收方法仅在用户上线时调用,因此请务必添加您的 -

(Void)ViewDidLoad{

[QBRequest logInWithUserLogin:@"xxxxxx"
                         password:@"xxxxx"
                     successBlock:^(QBResponse * _Nonnull response, QBUUser * _Nullable user)
     {
}];
[[QBChat instance] connectWithUser:self.user completion:^(NSError * _Nullable error) {
        NSLog(@"User%@",self.user);
 }];
}

它将被调用。