Integrate opentok video conferencing into parse.com + iOS app

房东的猫 提交于 2019-12-03 03:46:46

I strongly felt that the tokbox tutorial was quite basic, accomplished the requirement but had steeper learning curve. So I ended up wrote out my own app-cum-tutorial:

I feel compelled to post it here: How To write your first iPhone Video Chat App using parse and opentok(tokbox)

Whenever a person connects to Opentok, they need two things: session id and token

You can think of session ids as room ids. People who connect to the same session ids are able to talk to everyone else in the same session.

Tokens are just passwords to get into the session.

In your app, this may be the best flow:

  1. Two people using your app want to communicate with each other.
  2. Your app signals your server that they want to talk to each other.
  3. Your server will ask our server for a session id.
  4. Your server will generate a valid token that works for the session id.
  5. Your server will relay the session id and token to your two people.
  6. Both users will connect to the session using the session id and token, and then they will be able to talk to each other

If you can individually tackle each of those steps, it shouldn't be too hard.

It is up to your app implementation on how you will communicate that two users will want to start a session with each other. After that, you can follow the OpenTok documentations on how to do the rest of the steps (3-4 and 6)

References:

Please note that generating a session and a token should be done server-side, so the client does not see your api secret.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!