Skip to content

haojiezhe12345/ScreenShare-WebRTC

Repository files navigation

ScreenShare-WebRTC

Browser-based screen share over WebRTC P2P connections

Prerequisites

  • Clone the source or download zip
  • Have Node.js 20 installed (lower version may work, but not tested)

Run

Install all required packages with:

npm install

Then run the main server with:

node main.js

Configuration

Server config is saved in config/server.json

Usage

Host (source) page: /host.html

Client (receiver) page: /client.html

WebSocket signaling channel: /signal?name=<name>&type=<host|client>

Peers list: /peers

To start streaming, the host and client should enter a common name.
Once both sides are registered on the server, the stream will start.

The stream is transmitted over P2P connections, so it's best used under LANs, or peers with open NAT.

About

Browser-based screen share over WebRTC P2P connections

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published