The OpenTok platform, developed by TokBox, is a WebRTC platform that embeds interactive video, voice, messaging, and screen sharing into web and mobile apps. The OpenTok platform includes client libraries for web and native clients (iOS, Android), server-side SDKs and a REST API.
The OpenTok.js integration to callstats.io was built by WebRTC.ventures and the code documentation is available on GitHub.
Serve the callstats-opentok-shim from your website or from callstats.io’s CDN, add https://api.callstats.io/callstats-opentok-shim.min.js
file on your page after the callstats.js 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 like shown below:
CallstatsOpenTok.initialize(opts);
Currently, the shim supports AppID
, AppSecret
, and SessionID
. So, for example:
CallstatsOpenTok.initialize({
AppId: 834738451,
AppSecret: 'sOTjsJEfwPUGW4SRJI4BhbprGJ3lfO6Kp+:ixCX1P9mzNThlsW+YNLlb=',
SessionId: '1_eiTh54cMjNx4FNk-JkT15IXNTGtNnh8W03m0RwYTMxUMNMDyhU2gzMxezMXjaF0Mj0E-UH4'
});