Check out the newest issue of our WebRTC Metrics Report series!

callstats.io integration to the popular TokBox/OpenTok platform
By: , ,
27 September 2017

We are pleased to announce that the WebRTC.ventures has open sourced their integration of opentok.js integration with callstats.io. Especially thankful to Arin, Rafael, and the team for developing and volunteering to maintain the integration for anyone using opentok.js.

The current integration covers the 1) peer-to-peer, and 2) the star topology using the media bridge. However, the current integration does not work appropriately for multi-party mesh conferences, the main reason for this is that the TokBoX API does not expose an identifier for remote parties, hence the shim needs the application provider to provide the local and remote userIDs.

How to integrate?

For full documentation, go to the GitHub library.

Add the https://api.callstats.io/static/callstats-opentok-shim.min.js file in your page after the callstats.io script.


<script src="https://api.callstats.io/static/callstats.min.js"></script>
<script src="https://api.callstats.io/static/callstats-opentok-shim.js"></script>

Then, initialize the like shown below:

CallstatsOpenTok.initialize(opts);

Currently, the shim supports AppID, AppSecret, and SessionID. So, in example:

CallstatsOpenTok.initialize({
  AppId: 834738451,
  AppSecret: 'sOTjsJEfwPUGW4SRJI4BhbprGJ3lfO6Kp+:ixCX1P9mzNThlsW+YNLlb=',
  SessionId: '1_eiTh54cMjNx4FNk-JkT15IXNTGtNnh8W03m0RwYTMxUMNMDyhU2gzMxezMXjaF0Mj0E-UH4'
});

Try out callstats.io for TokBox

To start monitoring your TokBox app, you can create an free account with callstats.io, today!



comments powered by Disqus