Developers

Step 0: Sign up

This quick start guide will enable you to hook into our WebRTC servers. The goal of this guide is to ensure that your credentials are entered correctly and that you understand the main concepts behind using the XirSys platform.

Please sign up for our service here. After you’re all registered and ready to go, make your way to the XirSys dashboard.

Step 1: Create a room

Your application will need a unique connection point to our service, which can be easily created via the domains section within the XirSys dashboard. Each domain may have many applications, and each application may have many rooms. Domains and applications are simply namespaces. They (along with rooms) must be between 4 and 253 characters in length. Rooms are your application’s unique connection points to our service.

Within your dashboard, click on the “Show domains” button.

 

Create a new domain.

 

Ensure that your new domain has been created, and then click on the new domain’s apps.

 

You’ll see that this domain has already been populated with a default application. Please click on the default application’s rooms.

 

You’ll also see that a default room has already been created for this particular application. We will be using this room to initiate a WebRTC connection. You’re doing great! It’s time for the next step.

Step 2: Grab your credentials

The XirSys service utilizes a secret token for API authentication. This token should only be implemented in a secure environment, such as a server-side application or a compiled client-side application. Failure to do this will result in unwanted users hijacking your TURN bandwidth and other security flaws. You can view this demo that shows you how to use Node.js to query the Xirsys API from a serverside counterpart securely. However, for simplicity’s sake, we’re going to break that rule just this once and initiate a WebRTC connection from the client-side through a jQuery POST request. Please copy your secret token from your dashboard.

 

All of the information in the table below is required for a successful ICE request to our service. These credentials can all be found within your dashboard.

Key  Value
ident Username
secret Secret
domain my.domain.com
application AppName
room RoomName
secure 0 or 1

Step 3: Make the ICE request

The STUN protocol and its TURN extension are part of our ICE framework. In order to use our STUN and TURN servers, you must first request an ICE string from our ICE framework.

Setting secure to 1 will ensure that the returned ICE string is formatted for TLS WebRTC connections over port 443. This is sometimes necessary for complicated NATs that disallow UDP packets sent over the standard port 80. A value of 0 will return a standard, unsecure port 80 ICE string. We usually recommend setting secure to 1.

Please initiate a request with the following jQuery code:

 

If you received the following output, then congratulations! You’ve successfully initiated your first WebRTC connection through XirSys.

 

Achievement unlocked! You know now that you’ve correctly entered your credentials and also have a basic understanding of the XirSys platform. It’s time take you on a journey through our documentation.

 


Developers