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.
We've gone to great length to make this library work in as many browsers as possible. SkylinkJS is build on top of AdapterJS and works with our Temasys WebRTC Plugin even in Internet Explorer and Safari on Mac and PC.
You'll need a Temasys Developer Account and an API key to use this. Register here to get your API key.
Please read how you can find help, contribute and support us advancing SkylinkJS on our Github Page.
- Clone or download this repository via Git terminal:
git clone https://github.com/Temasys/SkylinkJS.git
- Install all required SkylinkJS dependencies:
npm install
- Install Grunt to run tasks:
npm install grunt -g
npm install grunt-cli -g
- Install Browserify and Testling to run test scripts :
npm install browserify -g
npm install testling -f
- Run the start script to start a local webserver to be able access the demo and doc folders. This will popup Chrome (Mac). You can configure a different browsers in the
start.sh
file.
npm start
# or
sh start.sh
For developers making edits on the source code, here are the commands to make sure it is Skylink friendly:
grunt jshint
: To check for code formatting and syntax errors.grunt yuidoc
: To generate document from code.grunt dev
: To run and compile all the codes.grunt publish
: To run when code is ready for next release.
Here's the format to push commits into Skylink:
[Ticket][Type: DOC|DEMO|STY|ENH|REF|DEP|BUG][WIP|<null>]: Commit name
DOC
: This commit is related to documentation changes.DEMO
: This commit is related to demo changes.STY
: This commit is related to interface styling changes.ENH
: This commit is related to an enhancement of a feature or new feature. Some improvements.REF
: This commit is to upgrade the dependencies reference or changes to the references in Skylink.DEP
: This commit is to upgrade the dependencies. e.g. socket.io-client 1.2.1 upgradeBUG
: This commit is to fix a bug.WIP
: This commit related to the ticket state is still in progress. Incomplete
Examples:
- Commit that's a new feature but still in progress
[#12][ENH][WIP]: New feature in progress.
- Commit that's a bug fix that has been completed
[#15][BUG]: Fix for new bug found.
Some demos to help with the development.
Create your own config.js
file with your own API keys to use demo.
YUI documentation for the SkylinkJS object and its events
Template for our YUI documentation
The production version of the library and a minified copy of it
The skylink.js library development files
Run sh test.sh <type> <param>
to test SkylinkJS, where <type>
is either bot
for running a bot required for test and test
for running the test.
Available tests
event
: Tests the events triggering, subscription and unsubscription.
sh test.sh test event
socket
: Tests the socket connection reliability and fallback.
sh test.sh test socket
api
: Tests api server parsing and connection.
sh test.sh test api
peer
: Tests the peer connection signaling state and ice connection state.
#run first
sh test.sh bot peer
#then in another terminal
sh test.sh test peer
message
: Tests the messaging system like sendMessage or sendP2PMessage.
#run first
sh test.sh bot message
#then in another terminal
sh test.sh test message
transfer
: Tests the data transfer with blob data like sendBlobData.
#run first
sh test.sh bot transfer
#then in another terminal
sh test.sh test transfer
stream
: Tests the stream sending and parsing like getUserMedia, sendStream and joinRoom mediaConstraints.
#run first
sh test.sh bot stream
#then in another terminal
sh test.sh test stream
debug
: Tests the debug mode. Currently, it is able to test if the SkylinkLogs are enabled or not.
sh test.sh bot debug
async
: Tests the async callbacks.
#run first
sh test.sh bot async
#then in another terminal
sh test.sh test async
sdp
: Tests the SDP modifications.
#run first
sh test.sh bot sdp
#then in another terminal
sh test.sh test sdp