Skip to content

Latest commit

 

History

History
66 lines (48 loc) · 1.25 KB

README.md

File metadata and controls

66 lines (48 loc) · 1.25 KB

Full-Mesh WebRTC

This is an educational implementation with SvelteKit and NodeJS WebSockets for signalling.

The main purpose here is to observe the limits of a full-mesh topology for a network and computationally intensive task like video through WebRTC.

Trying it out

Client

The client is a simple SvelteKit app. We need a simple environment variable to point to the server host:

cd packages/client
echo 'PUBLIC_WS_SERVER_URL="http://localhost:8080"' > .env.local
yarn install
yarn dev

Server

Despite the peer-to-peer architecture, implementation would be much harder without a signalling server. Here we use websockets.

cd packages/server
yarn install
yarn dev

Deploying

This is almost the same process. Don't forget to set the client's environment variable in your deployment environment.

Production client

cd packages/client
yarn install
yarn build
yarn start

Production server

cd packages/server
yarn install
yarn start