Suggestions

close search

Back to Basic Video Chat Overview

Basic Video Chat Step 1: Setting up the test web service

  1. 1
    Basic Video Chat Step 1:
    Setting up the test web service
  2. 2
    Basic Video Chat Step 2:
    Configuring and testing the app
  3. 3
    Basic Video Chat Step 3:
    Initializing an OpenTok session
  4. 4
    Basic Video Chat Step 4:
    Connecting to the session
  5. 5
    Basic Video Chat Step 5:
    Publishing a stream to the session
  6. 6
    Basic Video Chat Step 6:
    Subscribing to audio-video streams

In order to run an OpenTok application in the browser, you need to get an OpenTok session ID and token from a server that uses one of the OpenTok server-side SDKs.

The basic tutorial uses a web service that uses the OpenTok PHP SDK to generate the OpenTok session ID and token. The Learning OpenTok PHP repo includes code for setting up this web service.

However, to test this tutorial, you do not need to have a PHP server environment set up. You can deploy the tutorial web service on Heroku. Heroku is a PaaS (Platform as a Service) that can be used to deploy simple and small applications for free. To easily deploy the Learning OpenTok PHP web service to Heroku, sign up for a Heroku account and click this button:

Deploy

Heroku will prompt you to add your OpenTok API key and secret. Log in to your TokBox Account and find them on the Project Page.

The Learning OpenTok PHP web service handles the following API calls:

You can also install this repository on your own PHP server. See the instructions at the Learning OpenTok PHP repo.

Got it! Go to step 2
  1. 1
    Basic Video Chat Step 1:
    Setting up the test web service
  2. 2
    Basic Video Chat Step 2:
    Configuring and testing the app
  3. 3
    Basic Video Chat Step 3:
    Initializing an OpenTok session
  4. 4
    Basic Video Chat Step 4:
    Connecting to the session
  5. 5
    Basic Video Chat Step 5:
    Publishing a stream to the session
  6. 6
    Basic Video Chat Step 6:
    Subscribing to audio-video streams