What Is the ‘Playground’?
Vonage Video API Playground is a demo of a web app where you can explore basic Vonage Video API capabilities. You can publish a stream and subscribe to it using your own project API key. It is based on the OpenTok.js SDK and you can choose the SDK version up to the second to last.
Vonage API Account
To complete this tutorial, you will need a Vonage API account. If you don’t have one already, you can sign up today and start building with free credit. Once you have an account, you can find your API Key and API Secret at the top of the Vonage API Dashboard.
How to Use Playground
You don’t need to write any code. Playground requires you to log in to your Video API account if you haven't logged in yet.
What you can do with Playground:
- Publish a stream
- Subscribe to a stream
- Signaling API
- Dial SIP
I’m going to show you how to publish a stream and subscribe to it using Playground.
In a desktop browser, go to Playground.
Click on Create to create a session.
Optional: Change account ID or project API key, JS SDK version, Media mode, Token role or expiration time.
Click on Connect to connect to a session.
Optional: You can configure your own TURN server or IP Proxy from the Advanced Firewall Control menu.
Click on Publish Stream.
Click on Publish.
Optional: Change publisher option. Choose videoSource as ‘screen’ for screen-sharing.
Now you are publishing a stream in the session. You can also use Signaling, Archiving, Broadcasting, and SIP here.
Next, let’s join the session from another device. Click on Session information and copy the session ID.
From another device, browse to https://tokbox.com/developer/tools/playground/
Click on Join existing session and paste the session ID. Click on Join Session.
Publish a stream from Publish Stream. Now you are interactively publishing and subscribing.
Once the session is finished, click on Disconnect to disconnect from the session.