Introducing the OpenTok Server API on Salesforce

  July 2, 2015       Nimil Christopher

What is OpenTok

Opentok is a platform that enables developers to build live, face-to-face video and audio conferencing facilities directly into their web and mobile applications. OpenToks REST APIs allow you to build WebRTC applications with far fewer lines of code, enabling you to focus on building amazing applications as opposed to writing off-the-shelf webRTC code.

OpenTok already provide server side SDKs to access their Rest API on a number of different languages or frameworks (JAVA, PHP, Python, Node.js, Ruby and .NET). But there weren’t any that were native to Salesforce APEX, which meant having to write your own wrappers in APEX and access the APIs directly.

Some of us like to “get on with it instead of having to write REST wrappers, which prompted me to write this SDK. It enables us to build applications that might require face-to-face live video and audio conferencing facilities. One such example application we created at makepositive is an interview management module for one of our clients (screenshots below).

Getting Started with the API

Instructions on how to install the server SDKs into Salesforce is documented on the project’s Github page. However before you actually start using the SDK, it might be worth going through some of the basics of the OpenTok platform and how to use its APIs to build your applications.

OpenTok Basics – https://tokbox.com/opentok/quick-start/

Github – https://github.com/nchristopher/openTok-Salesforce

Example application built using the SDK

We used the salesforce sdk to build an Interview Management Application for one of our clients. They wanted to have the ability to conduct an interview both offline and online(with a live Interviewer). Both these interviews had to be recorded and archived. The archived recordings were stored in amazon s3.

The high level requirements of this application was :

  • Offline Interviewing capabilities:
  • A preparation page for the Interviewing Officer
  • Ability to select random questions from a question Bank
  • A preparation page for the Interviewee
  • Ability for the Interviewee to answer questions selected in random by the Interviewing Officer
  • Recording the Interviewee Answers
  • Online Interviewing capabilities:
  • Ability to schedule an online Interview
  • Realtime Interview
  • Ability to share an Interview

 

Screenshots

Offline  Interview

Interviewee preparation page

1. Interviewee preparation page

Interviewee Question Page(Time Boxed)

2. Interviewee Question Page(Time Boxed)

Interview Complete Page

3. Interview Complete Page

Online Interview(Live Interview)

Live Interview Page with text chat(Opentok Signalling API)

1. Live Interview Page with text chat(Opentok Signalling API)

Get Involved

The benefits of starting, using or contributing to open source projects is often undervalued. So if you want to get involved or would like to add new features, refactor or add more tests, please feel free.
The process to contribute is documented at https://github.com/nchristopher/openTokSFDC/blob/master/CONTRIBUTING.md