prepare for malaysia trip

  • what opentok – api can do

: to generate OpenTok sessions (session 相当于房间 ),

session never expired , also can not be explicit destroy .  user connect to session use token , token can be expired.

once a session is created ,  should define  how clients in the session will send audio-video streams,  there are two types :

a) Relayed   : mean p2p ,  but if in case can not connect cause firewall or other reason , will use opentok TURN server to relay .

b)Routed , 全部由 opentok 中转

The OpenTok Media Router supports the OpenTok archiving feature,  是否想录像必须是这个模式

In clients using the OpenTok iOS and Android SDKs, relayed sessions support only two clients connected to the session. The OpenTok Media Router supports additional clients for multiparty sessions on mobile devices.

手机版 relay 模式只支持2个client直连


Choosing Relayed vs. Routed session type

Use a relayed instead of a routed session, if you have only two participants (or maybe even three) and you are not using archiving. Using relayed sessions reduces the latency between participants, reduces the points of failure and you can get better quality video and audio in most cases.

Routed sessions are required if you want to archive your session. They are recommended if you have more than two or three participants in the session.


  • How to create session on server side :  use node.js example


How to create token :  From

之后, client 怎么知道 这个session id 和 token  ????

  • session 自带一些事件, 可以给这些事件设置回调, 比如统计room的在线人数



  • how many types of opentok-api

web;  android ; IOS; windows desktop;

  • show android and web example







  • what is web-rtc

mean :  web Real-Time Communications