2016-09-13 94 views
0

Quickblox webrtc視頻呼叫接收方法不叫。我打電話給他接受電話的人,我們可以溝通,但他打電話給我時,我不是那個電話。 `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]; 
} 
+0

您是否添加了「[QBRTCClient.instance addDelegate:self];」 –

+0

是的,我添加它的視圖將出現 - (void)viewWillAppear:(BOOL)animated {QBRTCClient.instance addDelegate:self]; } – viveksharma

+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); 
}]; 
} 

它會被調用。