<smooth-opentok>
Opentok's API wrapped as a Polymer element for sane humans.
Install prerequisites
$ npm install & npm install -g polymer-cli
Trust the local SSL certificate
You can find the certificate in /local-https
. You need this because opentok.js
(esp. screen-sharing) only work properly on https://
schemes. You can find
a guide on how to trust self-signed certificates for MacOS here.
Load the unpacked screen-sharing extensions
You can find extensions for each browser in the /extensions
directory. For
now it's just Chrome, since the latest versions of Firefox support
screen-sharing without extensions.
Start a credentials server
There's a NodeJS credentials server which serves OpenTok credentials using the OpenTok Server SDK's.
You can start it with:
# You need a TokBox account in order to retrieve an actual API key and secret.
$ npm run credentials-server -- --opentok-api-key="your-api-key" --opentok-api-secret="your-api-token"
Important: When running the tests, this server is automatically started so make sure you shut down any running instances of it before running the tests.
Run the element
$ polymer serve -P https/1.1 --key local-https/server.key --cert local-https/server.crt --hostname localhost --port 3000
and visit: https://localhost:3000/components/smooth-opentok.
Important: You will be asked to visit https://127.0.0.1:3000/components/smooth-opentok.
Ignore this and visit https://localhost:3000/components/smooth-opentok instead,
since the SSL certificates are specifically made for localhost
.
Running Tests
Ensure any running credentials server instances are shut down, then:
$ npm install -g mocha
$ npm test -- --opentok-api-key="your-api-key" --opentok-api-secret="your-api-token"
Authors
- Nicholas Kyriakides, @nicholaswmin
- TheProfs (Owners)