This sample application can be used to create an OpenTok video session with multiple participants. Each participant will display in a different panel. Any participant can click the "Analyze" button to submit the other participants to the Azure Face API to determine their sentiment. Once Face API returns the request an emoji will be added to the participants video panel denoting their sentiment.
If you're new to OpenTok, you can sign up for a Tokbox account and get some free credit to get you started.
- A TokBox Account
- An Azure Account with Face API Cognitive Service
- Optional: Ngrok for test deployment
-
Clone this repository.
-
Edit the /js/config.js file and set values each of the variables.
Variable | Description |
---|---|
OPENTOK_API_KEY | Project specific API Key found in your TokBox Account |
OPENTOK_SESSION_ID | Session ID generated in your TokBox Account (Read more below) |
OPENTOK_TOKEN | Token generated in your TokBox Account (Read more below) |
AZURE_FACE_API_SUBSCRIPTION_KEY | Subscription Key associated with your Azure Face API service |
AZURE_FACE_API_ENDPOINT | Uri endpoint associated with your Azure Face API service |
To generate an OpenTok Session ID & Token, log into your TokBox Account, and either create a new project or use an existing project. Then go to your project page and scroll down to the Project Tools section. From there, you can generate a session ID and token manually. Use the project’s API key along with the session ID and token you generated.
Important notes:
- You can continue to get the session ID and token values from your Account during testing and development, but before you go into production you must set up a server. To learn more, visit OpenTok Basics in the Developer Documentation.
We love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:
- Open an issue on this repository
- Tweet at us! We're @VonageDev on Twitter
- Or join the Vonage Community Slack
- Check out the Developer Documentation at https://tokbox.com/developer/