我正在使用Quickblox sdk.i正在使用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")
}
答案 0 :(得分:1)
请尝试此代码
你需要在qbrtcclient委托之后首先添加聊天委托需要添加我在此步骤后解决了同样的问题。
QBChat.instance.addDelegate(self)
QBRTCClient.instance().add(self)
答案 1 :(得分:0)