我正在用Quickblox-sdk在一个SWIFT语言的视频通话项目中工作。我正试图用它的quickbloxid与另一个用户通话。但当我开始从一个设备呼叫另一个设备时。没有在另一个设备上调用didReceiveNewSession委托方法,并且日志显示服务不可用的错误消息。请告诉我哪里做错了。提前感谢。
QBRTCClient.instance().addDelegate(self)
func didReceiveNewSession(session: QBRTCSession!, userInfo: Dictionary<NSObject, AnyObject>!)
{
print("received call")
}
func session(session: QBRTCSession!, connectedToUser userID: NSNumber!) {
AppSingletonObj.showAlert("", messsage: "connectedToUser Delegate caled")
}
func session(session: QBRTCSession!, disconnectedByTimeoutFromUser userID: NSNumber!) {
AppSingletonObj.showAlert("", messsage: "disconnectedByTimeoutFromUser Delegate caled")
}
func session(session: QBRTCSession!, hungUpByUser userID: NSNumber!, userInfo: [NSObject : AnyObject]!) {
AppSingletonObj.showAlert("", messsage: "hungUpByUser Delegate caled")
}
func session(session: QBRTCSession!, initializedLocalMediaStream mediaStream: QBRTCMediaStream!) {
mediaStream.videoTrack.videoCapture = self.cameraCapture
AppSingletonObj.showAlert("", messsage: "initializedLocalMediaStream Delegate caled")
}
func session(session: QBRTCSession!, rejectedByUser userID: NSNumber!, userInfo: [NSObject : AnyObject]!) {
AppSingletonObj.showAlert("", messsage: "rejectedByUser Delegate caled")
}
func session(session: QBRTCSession!, startedConnectingToUser userID: NSNumber!) {
AppSingletonObj.showAlert("", messsage: "startedConnectingToUser Delegate caled")
}
func session(session: QBRTCSession!, userDidNotRespond userID: NSNumber!) {
AppSingletonObj.showAlert("", messsage: "userDidNotRespond Delegate caled")
}
func session(session: QBRTCSession!, connectionClosedForUser userID: NSNumber!) {
AppSingletonObj.showAlert("", messsage: "connectionClosedForUser Delegate caled")
}
func session(session: QBRTCSession!, disconnectedFromUser userID: NSNumber!) {
AppSingletonObj.showAlert("", messsage: "disconnectedFromUser Delegate caled")
}
func session(session: QBRTCSession!, updatedStatsReport report: QBRTCStatsReport!, forUserID userID: NSNumber!) {
AppSingletonObj.showAlert("", messsage: "updatedStatsReport Delegate caled")
}
func session(session: QBRTCSession!, receivedRemoteVideoTrack videoTrack: QBRTCVideoTrack!, fromUser userID: NSNumber!) {
AppSingletonObj.showAlert("", messsage: "receivedRemoteVideoTrack Delegate caled")
}
func session(session: QBRTCSession!, connectionFailedForUser userID: NSNumber!) {
AppSingletonObj.showAlert("", messsage: "connectionFailedForUser Delegate caled")
}
func session(session: QBRTCSession!, acceptedByUser userID: NSNumber!, userInfo: [NSObject : AnyObject]!) {
AppSingletonObj.showAlert("", messsage: "acceptedByUser Delegate caled")
}
- 你连接到聊天室了吗
- 你也打过电话吗QBRTCClient.initializeRTC()
请尝试此代码
你需要添加聊天代表也在第一个qbrtcclient代表需要添加我有相同的问题解决后这一步。
QBChat.instance.addDelegate(self)
QBRTCClient.instance().add(self)