P2P Signalling server built with IPFSPubSub and WEBRTC
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
- Install the library
$ npm i websig --save
const websig = require('websig')// Place in your STUN/TURN server to tackle Nating issuesconst server = { 'iceServers': [{ 'urls': 'stun:global.stun.twilio.com:3478?transport=udp' }]};const roomname = 'test';const webrtc = new websig(roomname, server);// establish a webrtc datachannel connectionwebrtc.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 messagewebrtc.send('Hello World!!');
Supports
- Browserify
- React
- 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
- Navigate to example folder
$ cd example$ npm i
- Run browserify
$ browserify app.js -o public/js/app.js -d
- Run the app
$ http-server