RealTimeWeekly | TokBox OpenTok tutorial
webrtc, tokbox, opentok
16458
single,single-post,postid-16458,single-format-video,ajax_fade,page_not_loaded,,qode-theme-ver-5.9,wpb-js-composer js-comp-ver-4.3.4,vc_responsive
 

Open Tok video chat demo

13 Mar Open Tok video chat demo

If you’re looking for a simple way to implement WebRTC chat, one of the popular commercial offerings out there is OpenTok, by TokBox. In this video, we show you how to create a super simple video chat using OpenTok.

OpenTOK is a platform that simplifies the Web camera integration with the browser creating an application layer over WebRTC, and it also works as an intermediary when direct peer-to-peer communication is not possible between two clients.

The first step is to create an account on TokBox.com, and once created you have the ability to get an API key and generate sessions.

TokBoxKeys

In this project we will generate a session from their service, but for more complex needs you will probably need the ability to generate sessions using the API, which should be accessed through code in the server. For simplicity’s sake in this demo we’re going to work only Javascript on the client side.

TokBox sessions will have an expiration associated with them, but if you’re just checking out the tools you can set it to be long enough for you to create the project.

In the video, we use a simple Node.js application to host the code. You can see the full code we use in the video and in the following gist, just remember to set the values of the variables for your API_KEY, SESSION_ID, and TOKEN.

If you want to learn more about WebRTC, make sure to see our list of the Top WebRTC Tutorials, our free email course on WebRTC Basics, and of course sign up for RealTimeWeekly!

This quick demo was produced by Giancarlo Palavicini and Arin Sime of AgilityFeat software development.

Tags:
,