websig

0.0.7 • Public • Published


Lotion

P2P Signalling server built with IPFSPubSub and WEBRTC

Travis Build


Introduction

Websig is P2P Signalling server for WEBRTC built on top of IPFSPubSub and WEBRTC Protocol. It is able to create peer to peer webrtc data channels and audio/video conferencing in your frontend applications

Please 🌟 the Repo if you liked it. Thanks !

Usuage

  1. Install the library
$ npm i websig --save
const websig = require('websig')
// Place in your STUN/TURN server to tackle Nating issues
const server = {
    'iceServers': [{
        'urls': 'stun:global.stun.twilio.com:3478?transport=udp'
    }]
};
const roomname = 'test';
const webrtc =  new websig(roomname, server);
// establish a webrtc datachannel connection
webrtc.ispeerjoined.subscribe(data => {
    if (data) {
        webrtc.connectWEBRTC();
        webrtc.datachannelData.subscribe(msg => {
            console.log("data is =>", msg);
        }, error => {
            console.log(error)
        })
    }
}, error => {
    console.log(error)
})
// sending message
webrtc.send('Hello World!!');

Supports

  1. Browserify
  2. React
  3. VUE

Todo

  • Support Audio/Video channels
  • Create an example app using websig
  • Add support for Angular and TS
  • Support Multi Party webrtc channels

Example app

  1. Navigate to example folder
cd example
$ npm i 
  1. Run browserify
$ browserify app.js -o public/js/app.js -d
  1. Run the app
$ http-server

Author

SaifRehman

Package Sidebar

Install

npm i websig

Weekly Downloads

3

Version

0.0.7

License

MIT

Unpacked Size

363 kB

Total Files

10

Last publish

Collaborators

  • s4saif