Clone the https://github.com/opentok/learning-opentok-web repository:
git clone email@example.com:opentok/learning-opentok-web.git cd learning-opentok-web
Make sure that you have the basic branch checked out. You can switch to
git checkout basics command.
web/js directory and make a copy of the sampleconfig.js file, naming it config.js.
Edit the config.js file and set the value for SAMPLE_SERVER_BASE_URL.
If you deployed a the test web service to a local PHP server, set this to the following:
var SAMPLE_SERVER_BASE_URL = 'http://localhost:8080';
If you deployed this to Heroku, set this to the following:
var SAMPLE_SERVER_BASE_URL = 'https://YOUR-HEROKU-APP-URL';
Do not add the trailing slash of the URL.
The web app lives at index.html. You will need to run this on a web server. If you have Python on
your system, you can start the web server by running
python -m SimpleHTTPServer 8000 in the
Once you have the server running open the index.html in a supported browser. For example, if your local web server is running on port 8000, load the following URL:
The OpenTok.js library is supported in Chrome, Firefox, and Internet Explorer 10 - 11. (Internet Explorer requires installation of the OpenTok plugin, which the library asks you to install, if you haven't already.)
When prompted, grant the page access to your camera and microphone.
Mute the speaker on your computer, and then load the page again in another browser tab.
You will see a person-to-person video chat session using OpenTok.