All the information you need to get started is located here and (for WebRTC) here. We have comprehensive documentation, but you might want to start with our Hello World tutorial.
You'll need an API key to access our development environment and start building your application. Your API key is unique and private.
The client-side API is a JavaScript library that gives you control over how you size, place, move, and connect video streams within your application. For Flash developers, we also provide a client-side ActionScript library. The server-side API is a library in your programming language of choice that you can use to generate tokens and sessions IDs programmatically in a way that talks to your app.
If you are running the HTML page from your desktop as a "file://" URL, what is happening is that Flash is putting up a security wall in order to prevent "cross-domain" communication from taking place. If you step through the code, you will likely see that session.connect() never returns.
This problem only occurs when you run the file from your desktop using the "file://" URL. If you use a local server (ie. a localhost URL), the problem will go away. If you serve the file from a web server, the problem will go away.
To enable the page to work directly from the desktop using a "file://" prefix, you need to change Flash's security settings. You can do this using a page online that Adobe provides:
You should find that the HTML page starts working after this.
Quickly go through our user diagnostic tool so we can make sure that your hardware, software, and Internet are all up to par to use the OpenTok platform.
Make sure that you have installed the latest version of Flash Player. There were some issues in previous versions on Mac OS X Lion.
End users will need the following:
Yes! We have launched our new iOS SDKs, and are excited to see what you will build with them.
The quality varies based on users' connectivity.
As a developer, you generate an authentication token with the server-side APIs. You use this token when connecting to an OpenTok session. For sessions, TokBox protects privacy by generating a unique session ID—a randomized string of up to 255 alphanumeric characters—for each video chat session. Also, with OpenTok the developer can build functionality to remove unwanted participants.
If you don't see something you want or need, please contact us a .
We want lots of people to use OpenTok and are offering the basic live streaming for free. For more information see our pricing page
Try the following:
TB.setLogLevel() to send debug messages to the console.
TB.addEventListener()
method.
See the API reference documentation for the TB class.
Developers using the OpenTok JavaScript library should use a HTML debug console, such as Firebug (for Firefox) or the Google Chrome Debugger.
In Internet Explorer 8, links with href targets that invoke JavaScript actions cause a window.onbeforeunload event to be thrown. This event causes OpenTok to unload all components and disconnect from all sessions. Consequently, clicking on these kinds of links can unexpectedly disconnect OpenTok sessions, resulting in seemingly erratic behavior. In order to work around this problem, ensure that links with JavaScript actions are written as <a href="#" onclick="javascript:startPublishing();">Action</a> rather than as <a href="javascript:startPublishing();">Action</a>.
In some combinations of Flash versions and browsers, the Allow button in the Adobe Settings Panel cannot be clicked. The issue may occur when you center a Flash SWF or if you position the SWF relatively such that its x and y coordinates are not integers. As a workaround, add 0.5px to the margin-left of the SWF if the width of the window is odd; this is to make the x,y coordinates an integer. This doesn't work in every case, though.
For users to see each others’ audio/video streams, they need to connect to the same session (using the same session ID). Each OpenTok session is a collection of audio/video streams that can communicate with one another. To have users see each other's streams, do not generate unique session IDs for each user. Reuse the same session ID for each page in the session, and pass that session ID to the TB.initSession() method. (You do, however, generate unique connection tokens for each user.)
display:none?
This is a known issue in Firefox and Chrome (see Mozilla bug 90268).
This is the correct behavior for the OpenTok JavaScript API.
The element you pass into the Session.publish() or Session.subscribe()
method is an HTML DOM element to be replaced. It is not a container element. You can
create a container DIV element that contains another replacement element, and then pass that replacement
element to the Session.publish() or Session.subscribe() method.
The OpenTok JavaScript library supports HTTPS. If your page loads via HTTPS, be sure to load the OpenTok JavaScript library via HTTPS (otherwise the browser will display a warning to the user):
<script src="https://swww.tokbox.com/v0.91/js/TB.min.js" ></script>(Note, however, that OpenTok video streams are not sent on a secure socket.)
You can sign up for an OpenTok account at the OpenTok API demo page or at the OpenTok on WebRTC API demo page. This will also help you with the code you’ll need to build your OpenTok-powered application.
Use our Forgot Password flow to reset your password.
No. Your OpenTok account works across both the forums and the dashboard.
Yes. You should have received a migration email to help you get started. If you did not, please email us at support@tokbox.com , and we will help get you set up.
No, you don’t need a credit card on file to get started with OpenTok.
We accept any Visa, MasterCard, American Express, JCB, Discover, or Diners Club cards.
Yes, while archiving is in beta you will be able to archive without a credit card on file. Once archiving exits beta, you will need to add a credit card to your account to continue using it.
Login to the OpenTok dashboard to update your credit card.
Your billing cycle begins on the day of the month on which you sign up for either a paid minutes plan or premium support.
You will be charged monthly on the day of the month in which you originally signed up. For example, if you signed up January 15th, you will be charged on February 15th and every 15th of the month afterwards.
You’re all set! If you need help with your OpenTok-powered application, then email us at support@tokbox.com, and we’ll get back to you within one business day.
Please review our SLA document to get the full details about how the OpenTok SLA works, what constitutes downtime, and how to get credit if you experience downtime.
The email address associated with your OpenTok account will be flagged as a premium support partner in our support queue. Your inquiries will be prioritized and responded to faster.
If we are making a critical change to the OpenTok API that may cause your application to break, you will be notified by email at the address associated with your OpenTok account.
Please submit a bug to support@tokbox.com. Make sure to use the email associated with your OpenTok account so that we can identify you as a premium support partner.
No. You’ll only need to pay once you start to go over 25,000 group user minutes per month. Group user minutes are incurred in sessions with more than 2 participants.
If there is a call with 3+ people (publishing OR subscribing), then group minutes are introduced. For example, if 10 people are all sharing video for 10 minutes, that would be 10 x 10 = 100 group minutes. If 1 person was broadcasting to 9 people watching for 10 minutes, that would also be (1+9) x 10 = 100 group minutes.
If you go over your plan, then there is a 2 cent per user minute overage fee.
Example: Your monthly service starts 10/1 and you've selected the $250/mo 75,000 block of minutes. On 10/28, you see that you've actually used 130,000 minutes for the month. You will pay a 2 cent overage fee for the additional 55,000 minutes, amounting to $1,100. If before the current billing cycle ends, you upgrade your plan type to accommodate your minutes volume, you will not have to pay overage fees.
If you login to the OpenTok dashboard, then you will be able to see how many user minutes have been used for your API key.
User minutes do not roll over into the next month.
Web Real-Time Communication (WebRTC) is a new HTML5 standard framework that enables the sharing of video, audio, and data directly between web browsers. OpenTok on WebRTC is a video chat API that implements WebRTC.
No, WebRTC is a web standard which means no installations or downloads are required. Your users will need to have a compatible browser.
OpenTok is a layer on top of WebRTC that simplifies development by providing a set of APIs that handle common tasks associated with video chat applications. OpenTok on WebRTC enables you to take advantage of WebRTC with complementary APIs that handle session initiation, signaling, cross-platform interop (iOS and web), and more.
TokBox has just introduced the Mantis beta program. Mantis acts as a central switching station for non-peer-to-peer WebRTC streams. Mantis enables:
For more information, see the OpenTok blog. If you are interested participating in the beta, please contact us at mantis@tokbox.com.
Without using Mantis, OpenTok on WebRTC supports up to four people on the web and two people in an iOS application.
Google Chrome 23+ browser supports WebRTC.
WebRTC is in the Firefox Nightly Builds and should have full support soon.
WebRTC will work in Internet Explorer if you install the Google Chrome Frame. We don’t have an estimate on when the native implementation for WebRTC on IE will launch.
Yes! Get the library here.
Not yet.
No.
Yes, both stacks have the same pricing.
WebRTC uses UDP protocol, which means for WebRTC to work, your UDP ports must be open. These ports are usually open unless you are behind a firewall.
Clients using Google Chrome can use the OpenTok Diagnostic app to determine if they can connect to an OpenTok on WebRTC application.
For any other questions, please post to our forums.
To report a bug, please email .
Read up on the latest news, views, and developer insights from TokBox.