QuickBlox:未在 swift 中调用 didReceive 会话方法
QuickBlox : didReceiveNewSession Method is not gettimg called in swift
我正在使用 Quickblox 使用 SWIFT 语言进行视频通话项目之一 sdk.i 我正在尝试使用其 quickblox 与另一个用户通话。但是当我开始从一个设备呼叫另一个设备时。 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)
我正在使用 Quickblox 使用 SWIFT 语言进行视频通话项目之一 sdk.i 我正在尝试使用其 quickblox 与另一个用户通话。但是当我开始从一个设备呼叫另一个设备时。 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)