Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Latest commit

 

History

History

js

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

logo

OpenTok One-to-One Communication Sample App for JavaScript
Version 1.3

Quick start

This section shows you how to prepare and run the sample application. The app is built by the Accelerator Core JS.

Configuring the app

Configure the sample app code. Then, build and run the app.

  1. Get values for API Key, Session ID, and Token. See OpenTok One-to-One Communication Sample App home page for important information.

  2. In app.js, replace the following empty strings with the corresponding API Key, Session ID, and Token values:

     apiKey: '',    // Replace with your OpenTok API Key
     sessionId: '', // Replace with a generated Session ID
     token: '',     // Replace with a generated token (from the dashboard or using an OpenTok server SDK)

Deploying and running the app

$ npm install
$ npm run build
$ node server.js

The web page that loads the sample app for JavaScript must be served over HTTP/HTTPS. Browser security limitations prevent you from publishing video using a file:// path, as discussed in the OpenTok.js Release Notes. To support clients running Chrome 47 or later, HTTPS is required. A Node server will work, as will MAMP or XAMPP. You can also use a cloud service such as Heroku to host the application.

Exploring the code

For details about how to use the Accelerator Core in the sample app, see here.