簡體   English   中英

QuickBlox聊天:無法執行視頻通話

[英]QuickBlox Chat: can't perform video call

我正在使用quickblox開發視頻聊天應用程序。 而且我無法進行視頻通話。 一次啟動有兩個應用程序實例的日志:

Sep 11 16:43:40 iPod-touch DimChat[3823] <Warning>: QBChat/didConnect
Sep 11 16:43:40 iPod-touch DimChat[3823] <Warning>: -[QBChat xmppStreamDidAuthenticate:] -> user: 290427, supportsStartTLS: 1, isSecure: 0
Sep 11 16:43:40 iPod-touch DimChat[3823] <Warning>: -[QBChat xmppStream:didSendPresence:] -> Presence: <presence/>
Sep 11 16:43:40 iPod-touch DimChat[3823] <Warning>: -[QBChat xmppStream:didSendIQ:] -> IQ: <iq type="get" id="561006823"><query xmlns="jabber:iq:roster"/></iq>
Sep 11 16:43:41 iPod-touch DimChat[3823] <Warning>: -[QBChat xmppStream:didReceiveIQ:] -> <iq xmlns="jabber:client" id="561006823" type="result" to="290427-3936@chat.quickblox.com/tigase-3171"><query xmlns="jabber:iq:roster"/></iq>
Sep 11 16:44:00 iPod-touch DimChat[3823] <Warning>: -[QBChat xmppStream:didSendPresence:] -> Presence: <presence/>
Sep 11 16:44:18 iPod-touch wifid[14] <Error>: WiFi:[400596258.779212]: Disable WoW requested by "UserEventAgent"
Sep 11 16:44:18 iPod-touch DimChat[3823] <Warning>: QBChat/didDisconnect, error: Error Domain=GCDAsyncSocketErrorDomain Code=7 "Socket closed by remote peer" UserInfo=0x1ed273e0 {NSLocalizedDescription=Socket closed by remote peer}
Sep 11 16:44:20 iPod-touch DimChat[3823] <Warning>: -[QBChat sendPresence] -> return. You have to be logged in in order to use Chat API

第二個實例調用第一個實例:

2013-09-11 16:43:46.408 DimChat[55216:b10f] QBChat/didConnect
2013-09-11 16:43:47.053 DimChat[55216:a207] -[QBChat xmppStreamDidAuthenticate:] -> user: 503867, supportsStartTLS: 1, isSecure: 0
2013-09-11 16:43:47.053 DimChat[55216:a207] -[QBChat xmppStream:didSendIQ:] -> IQ: <iq type="get" id="561006823"><query xmlns="jabber:iq:roster"/></iq>
2013-09-11 16:43:47.053 DimChat[55216:a207] -[QBChat xmppStream:didSendPresence:] -> Presence: <presence/>
2013-09-11 16:43:47.215 DimChat[55216:b10f] -[QBChat xmppStream:didReceiveIQ:] -> <iq xmlns="jabber:client" id="561006823" type="result" to="503867-3936@chat.quickblox.com/tigase-3170"><query xmlns="jabber:iq:roster"/></iq>
2013-09-11 16:43:56.295 DimChat[55216:b10f] -[QBVideoChat init] -> 
2013-09-11 16:43:56.295 DimChat[55216:b10f] -[QBVideoChat orientatioDidChange:] -> LandscapeLeft
2013-09-11 16:43:56.296 DimChat[55216:b10f] -[QBVideoChat callUser:conferenceType:customParameters:] -> VideoChat configuration: {
    kQBVideoChatBadConnectionTimeout = 5;
    kQBVideoChatCallTimeout = 15;
    kQBVideoChatFrameQualityPreset = AVCaptureSessionPresetLow;
    kQBVideoChatP2PTimeout = "1.5";
    kQBVideoChatTURNServerEndPoint = "turnserver.quickblox.com";
    kQBVideoChatVideoFramesPerSecond = 10;
    kQBVideoChatWriteQueueMaxAudioOperationsThreshold = 25;
    kQBVideoChatWriteQueueMaxVideoOperationsThreshold = 25;
}
2013-09-11 16:43:56.296 DimChat[55216:b10f] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="282475249" type="qbvideochat_call" to="290427-3936@chat.quickblox.com" from="503867-3936@chat.quickblox.com"><body>1</body></message>
2013-09-11 16:43:58.297 DimChat[55216:b10f] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="1622650073" type="qbvideochat_call" to="290427-3936@chat.quickblox.com" from="503867-3936@chat.quickblox.com"><body>1</body></message>
2013-09-11 16:44:00.298 DimChat[55216:b10f] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="984943658" type="qbvideochat_call" to="290427-3936@chat.quickblox.com" from="503867-3936@chat.quickblox.com"><body>1</body></message>
2013-09-11 16:44:02.300 DimChat[55216:b10f] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="1144108930" type="qbvideochat_call" to="290427-3936@chat.quickblox.com" from="503867-3936@chat.quickblox.com"><body>1</body></message>
2013-09-11 16:44:04.300 DimChat[55216:b10f] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="470211272" type="qbvideochat_call" to="290427-3936@chat.quickblox.com" from="503867-3936@chat.quickblox.com"><body>1</body></message>
2013-09-11 16:44:06.302 DimChat[55216:b10f] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="101027544" type="qbvideochat_call" to="290427-3936@chat.quickblox.com" from="503867-3936@chat.quickblox.com"><body>1</body></message>
2013-09-11 16:44:07.065 DimChat[55216:b10f] -[QBChat xmppStream:didSendPresence:] -> Presence: <presence/>
2013-09-11 16:44:08.303 DimChat[55216:b10f] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="1457850878" type="qbvideochat_call" to="290427-3936@chat.quickblox.com" from="503867-3936@chat.quickblox.com"><body>1</body></message>
2013-09-11 16:44:10.303 DimChat[55216:b10f] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="1458777923" type="qbvideochat_call" to="290427-3936@chat.quickblox.com" from="503867-3936@chat.quickblox.com"><body>1</body></message>
2013-09-11 16:44:11.304 DimChat[55216:b10f] -[QBVideoChat finishCallWithStatus:customParameters:] -> kStopVideoChatCallStatus_OpponentDidNotAnswer
2013-09-11 16:44:11.305 DimChat[55216:b10f] -[QBVideoChat deinitialization] -> 
2013-09-11 16:44:11.305 DimChat[55216:b10f] -[QBVideoChat releaseVideoCapture] -> 
2013-09-11 16:44:11.306 DimChat[55216:b10f] -[QBVideoChat releaseAudioCapture] -> 
2013-09-11 16:44:11.306 DimChat[55216:b10f] -[QBVideoChat releaseSocketConnection] -> 
2013-09-11 16:44:11.306 DimChat[55216:b10f] -[QBChat xmppStream:didSendMessage:] -> Message: <message id="2007237709" type="qbvideochat_stopCall" to="290427-3936@chat.quickblox.com" from="503867-3936@chat.quickblox.com"><body>kStopVideoChatCallStatus_OpponentDidNotAnswer</body></message>
2013-09-11 16:44:25.264 DimChat[55216:b10f] QBChat/didDisconnect, error: Error Domain=GCDAsyncSocketErrorDomain Code=7 "Socket closed by remote peer" UserInfo=0x9ca1260 {NSLocalizedDescription=Socket closed by remote peer}
2013-09-11 16:44:27.074 DimChat[55216:b10f] -[QBChat sendPresence] -> return. You have to be logged in in order to use Chat API

實際上,問題在於第一個實例沒有收到傳入呼叫。 我檢查了來自quickblox的github的視頻聊天示例。 它可以與我的用戶名/密碼一起使用,因此我的代碼有誤,但是我真的不知道應該在哪里搜索。

如您所見,兩個實例都有相同的問題:“套接字被遠程對等體關閉”。 但是此問題在呼叫超時后發生,因此不是主要問題的原因。

最后,我找到了解決方案。 問題出在QBVideoChat對象中。 我以為QBChat會在另一個用戶打電話給我時向我發送信號,然后我將創建QBVideoChat對象並將其顯示在屏幕上。

可悲的事實是,在創建QBVideoChat之前,QBChat不會發送任何視頻關系信號。 所以我必須在程序開始時創建它,以便接收chatDidReceiveCallRequestFromUser信號。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM