Skip to content

Signaling server (Node.js) for peer-to-peer WebRTC communications

License

Notifications You must be signed in to change notification settings

marifehe/icebreaker.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

icebreaker.io

icebreaker.io enables peer-to-peer real-time communications, using WebRTC technology. It is built on top of socket.io, and it basically allows two peers to resolve how to connect over the internet and start an RTCPeerConnection. It consists in:

Context

WebRTC enables peer-to-peer communications, but the signaling methods and protocols needed for peers to discover each other are not defined by it. The reasoning behind this is summarized in the JavaScript Session Establishment Protocol (JSEP) IETF draft. This is why a signaling server is needed, so peers can discover and exchange information prior to establishing the WebRTC connection, but also after that, like:

  • ICE candidates information.
  • Session Description metadata (media details, transport addresses, etc).
  • Errors.
  • Remote peer disconnection.
  • Etc.

Installation

npm install icebreaker.io --save

How to use

icebreaker.io uses the same interface as socket.io, since it is built on top of it. As an example, below you can find how to start icebreaker.io along with Express:

const express = require('express');
const https = require('https');
const credentials = require('../your-credentials'); // credentials are needed for HTTPS
const icebreaker = require('icebreaker.io');

const app = express();
const server = https.createServer(credentials, app);
server.listen(8443);
// start signaling server
icebreaker(server);

Demo project

You can find a fully working demo project that uses both server and client icebreaker.io libraries here. It is a very basic video-chat application.

Tests

npm run test

This command runs the gulp task test, which runs the unit tests in the tests directory.

License

GPLv3

About

Signaling server (Node.js) for peer-to-peer WebRTC communications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published