SightCall Developer Center

Account Login Support

JavaScript SDK

This section is dedicated to the integration of the JavaScript SDK client into a web app.

System requirements

Compatible web browsers

Supported operating systems

At a minimum, Rtcc Plugin requires a Core 2 Duo PC or laptop with an audio input/output device.

WebRTC Hosting

In Chrome 47, security has been enhanced. As a consequence, pages hosting the RTCC component must be:

Download and link the JS SDK

The Rtcc JS SDK is JavaScript based and should be loaded each time the web app page is loaded.
You should include the Javascript library with a script tag that references the Rtcc download path and includes your App Identifier.

<script type="text/javascript" src="https://download.rtccloud.net/js/webappid/Your_App_Identifier"></script>

Download the Plugin

A Plugin needs to be installed to use SightCall's services if you are using Internet Explorer, Firefox or Safari.

This Plugin detection is part of our SDK. For example, assuming your RtccObj is named "rtcc", this snippet of code will let the user know he needs to download and install the Plugin, if it's not already installed:

rtcc.on('plugin.missing', function(url) {
  // "url" contains the download URL. 
  alert("Please download and install the Plugin: " + url); 
});

UI Considerations

The desktop Javascript SDK does not require any development to get a functional UI. When sending or receiving a call a floating call window inside the webpage appears and contains the video streams. In addition to that a sound is played when an incoming call arrives (ring tone) and another one for an outgoing call before the callee takes the call (dial tone).

Simple customization

It is possible to adjust some paramters using the option field of the new Rtcc command at startup (step 6 of the Authenticate How To).

container string

An HTML element id, in which the video box will be integrated. If used, this feature automatically disables drag&drop. If null, the video box is appened to the body and drag&drop is enabled.

Default: null.

uiDialToneUrl mixed: string/boolean

The URL of the custom dial tone. If set to false, no dial tone will be used.

Default: url of the Rtcc default dial tone.

uiRingToneUrl mixed: string/boolean

The URL of the custom dial tone. If set to false, no dial tone will be used.

Default: url of the Rtcc default dial tone.

Examples

var options = {
    uiDialToneUrl: false
}
var rtccObject = new Rtcc(webAppId, token, type, options);
var options = {
    uiDialToneUrl: 'http://mywebsite.com/my-dial-tone.mp3', //use custom dial tone
    uiRingToneUrl: 'http://mywebsite.com/my-ring-tone.mp3'  //use custom ring tone
}
var rtccObject = new Rtcc(webAppId, token, type, options);