Description • Architecture • WebRTC • Installation and Setup • License
WaveConnect is a JavaScript-based video conferencing application using WebRTC, featuring a mesh topology to facilitate seamless multi-peer connections.
- A wants to connect to B.
- A creates an offer, which includes SDP, ICE candidates, and security options.
- A sends the offer to B using a chosen method.
- B creates an answer after processing A's offer.
- B sends the answer back to A.
- Connection is established.
(Additional information about NAT, STUN, TURN, ICE, and SDP is provided.)
(Additional information about NAT, STUN, TURN, ICE, and SDP is provided.)
-
NAT : Network Address Translation
-
STUN Server :
- Session Traversal Utilities for NAT
- Does nothing, just required to get our public address so that we can share it to communicate with others, since we are using NAT.
-
TURN Server :
- Traversal Using Relays around NAT
- Just a normal server that relays packets
-
ICE :
- Interactive Connectivity Establishment : protocol
- ICE collects all available candidates(ice candidates)
- All collected addresses are then sent to remote peer via SDP.
-
SDP (Session Description Protocol)
- A format that describes ice candidates, networking options,media options, securtiy options and a lot of other stuff
- Not a protocol, its a format
- The goal is to take the SDP generated by user and send it to the other party
-
Signalling
- Send the SDP to other party via any of methods available like web sockets, HTTP request.
Prerequisites: node js
, yarn/npm
, git
- Clone the repository:
git clone https://github.com/VenuChoudhary001/Wave.git
Change the directory to wave-server
cd wave-server
$ yarn dev
- Using
npm
$ npm install peer -g
- Using
yarn
$ yarn add peer -g
Open a new terminal window and run server
$ peerjs --port 9000
Change the directory to wave-client
Install dependencies
$ yarn
Add the socket port here
let socket = io(`${SOCKET_SERVER_URL}`);
const myPeer = new Peer(undefined, {
host: "/",
port: "9000",
});
Start client
$ yarn start
This project uses an MIT license.