Integrate opentok video conferencing into parse.com + iOS app
This question is not only aimed at code but my app design as well.
I have an iphone app that requires opentok to handle the video/audio sessions. I have gone through basic samples but what I am confused about is session management.
For example, if my iphone app wants to call a user from a mapview, how do I do that if all I have is this user's location (coordinates)?
How do I ensure that the session I am publishing gets to that particular user somehow and that user subscribes to it? Currently I don't have any backend in my app. All I may have is location data of N users, who can possibly talk with each other through my iphone app, via opentok session. Let's just assume currently only 2 users per session is my requirement.
I also know there is some integration between opentok and parse but I simply can't gather everything in a neat pack and build it. I mean to ask, what should I store in Parse? What should I expect it to do automatically with opentok? And so on.
Any help or any code example where someone has opentok video integrated will be highly appreciated. If anyone uses parse for handling opentok sessions it would be the thing I want.
Update:
OK, I have parse set up and also have data under data tab. From this point, I wonder what all I need to do for the ability to incorporate opentok video? Broadcast tutorial is a starting point but does not put things quite in context, I still feel disconnected. Some more practical example is needed.
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:
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.
链接地址: http://www.djcxy.com/p/66136.html上一篇: OpenTok中的一对一连接