Page tree
Skip to end of metadata
Go to start of metadata

SkylinkJS is an open-source client-side library for your web-browser that enables any website to easily leverage the capabilities of WebRTC and its direct data streaming powers between peers for audio/video conferencing or file transfer. The source code can be forked on Github and you can file bugs and feature requests there, too.

You'll need a Temasys Developer Account and an API key to use this. Register here to get your App key.

We've gone to great length to make this library work in as many browsers as possible. SkylinkJS is built on top of our AdapterJS and supports browsers native implementations of WebRTC as well as the Temasys WebRTC Plugin for use in Internet Explorer and Safari.

 

Need help or want something changed?

Please read how you can find help, contribute and support us advancing SkylinkJS on our Support Page

SkylinkJS Extensions

SkylinkJS Extension build on the foundation provided by SkylinkJS and introduce additional functionality to ease implementation for specific use cases. 

 

  • SkylinkCCdesigned to aide in development of contact center (CC), call center and customer Service centric applications. It provide user roles for both customer and agent users, waiting room functionality, and real-time customer status events. 
      

 

Browser support and compatibility

Fix for plugin browsers

There has been a major bug affecting from version 0.4.2 to 0.3.0 working with our Plugin.

It's recommended to upgrade your SkylinkJS version to 0.5.x.

For browser support webrtc implementation, please checkout our AdapterJS support list.

VersionAdapterJS versionChrome 31+Opera 24+Firefox 31+IE 10+Safari 7+
>= 0.5.90.10.5YesYesYesYesYes
>= 0.5.80.10.4YesYesYesYesYes
>= 0.5.30.9.3YesYesYesYesYes
>= 0.5.10.9.1YesYesYesIE11+Yes
<= 0.5.00.9.1YesYesYesNoNo

Releases

Find the most recent releases with CDN links and documentation here: https://github.com/Temasys/SkylinkJS/releases

 

Integrating SkywayJS into your Platform

Please note

  • Socket.IO client javascript has to be loaded before SkylinkJS library.
  • To use the complete version that is packed with Socket.IO, please use the Complete Packaged version of SkylinkJS.
  • To know more about the AdapterJS functions like attachMediaStream and more, please visit AdapterJS page for the documentation.

  • To view more other functionality like chat, file transfers and other settings like the call duration, please check the documentation here.

To initialize SkylinkJS, simply call:

var sl = new Skylink();
sl.init('APP_KEY');

To use the events provided in SkylinkJS, use:

sw.on('event_name', function (param1, param2) {
 // .. do something
}); 

Here's a simple example to make a Video/Audio call:

var sl = new Skylink();
sl.init('APP_KEY');

// A new Peer has joined the Room
sl.on('peerJoined', function(peerId, peerInfo){
  console.log('Peer ' + peerId + ' has joined the room');
  var peerVideo = document.createElement('video');
  peerVideo.id = peerId + '_video';
  peerVideo.autoplay = 'autoplay';
  document.getElementById('peerVideoList').appendChild(peerVideo);
});
// Peer has Audio/Video stream to add
sl.on('addPeerStream', function(peerId, stream){
  // attachMediaStream is a Adapter function
  attachMediaStream(document.getElementById(peerId + '_video'), stream);
});
// User's Audio/Video stream has been successfully added
sl.on('mediaAccessSuccess', function(stream){
  // attachMediaStream is a Adapter function
  attachMediaStream( document.getElementById('localVideo'), stream );
});
// A Peer has left the room
sl.on('peerLeft', function(peerId){
  var peer = document.getElementById(peerId + '_video');
  document.getElementById('peerVideoList').removeChild(peer);
}); 
 
function joinRoom () { sl.joinRoom({ audio : true, video : true }); }
function leaveRoom () { sl.leaveRoom(); } 

Example in the HTML page. Add this in the <body> tag

<video id="localVideo" autoplay="autoplay"></video>
<div id="peerVideoList"></div>
<button type="button" onclick="joinRoom()">Start Call</button>
<button type="button" onclick="leaveRoom()">End Call</button>
 

 

  • No labels