Pergunta

I built a simple iOS app with the iOS SDK, and when I connect and publish video to my OpenTok session, there is no error.

When I try to join the same OpenTok session from my browser using the, I get the following errors:

TB.exception :: title: Connect Failed (1006) msg: TB.Socket Error :: The socket to fms402-oak.tokbox.com received an error: undefined  
TB.exception :: title: Connect Time-out (1008) msg: Connection to the server timed out.

I cant figure it out, please help.

Foi útil?

Solução

The reason you are getting this error is that your iOS app is using OpenTok's flash stack and your website is using the WebRTC stack. OpenTok's flash and Webrtc services are not interoperable and you would need to stick to one.

Your iOS is currently streaming to a flash media server. You website is trying to use WebRTC library, which is trying to establish a socket connection with the flash server, thus giving you the TB.Socket error.

What you should do is to stick to one stack.

OpenTok's webrtc JavaScript library with OpenTok webrtc iOS sdk

OpenTok's flash JavaScript library with OpenTok flash iOS sdk

Sometimes in Xcode, simply deleting the flash framework and dragging in the webrtc framework will not work. You would have to go to Project Navigator -> Project -> Build Settings -> Framework Search Paths and make sure its pointing to the correct OpenTok framework.

Good Luck!

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top