Skip to content

simonzander/PeerWave

Repository files navigation

PeerWave

WebRTC share peer to peer to peer... the endless meshed wave of sharing

Build Status GitHub last commit GitHub issues

How it works?

In the current version, you can share your screen, window, tab, or multiple files. This app uses Socket.io to manage some metadata for peers and files. The data is shared directly between peers without a server in the middle. All direct peers share the same stream or downloaded files to increase your audience and overcome limitations.

This is achieved using the WebRTC standard. A Google STUN server is used to establish connections between peers, but you can use your own STUN server if you host the app yourself. All metadata in this app is temporary and will be lost if the server restarts.

Table of Contents

Try It

You can find a running instance at peerwave.org

Stream Settings

Cropping

You can crop the hosted video with an experimental API that has not yet been standardized. As of 2024-06-19, this API is available in Chrome 94, Edge 94 and Opera 80.

Resizing

You can resize the hosted video with an experimental API that has not yet been standardized. As of 2024-06-19, this API is available in Chrome 94, Edge 94 and Opera 80.

Getting Started

Node

# Install dependencies for server
npm install

# Run the server
node server

Docker Build

# Building the image
docker build --tag peerwave .

# Run the image in a container
docker run -d -p 4000:4000 peerwave

Docker Hub

Image: simonzander/peerwave

# Pull the image from Docker Hub
docker pull simonzander/peerwave

# Run the image in a container
docker run -d -p 4000:4000 peerwave

Limitations

The main limitation is your upload speed, which is shared with your direct peers. If you are streaming, factors like the codec, resolution, and quick refreshes can increase your CPU (for VP8/VP9) or GPU (for H.264) load and affect your upload speed. The Chrome browser can handle up to 512 data connections and 56 streams.

If you are sharing files, the file size and the number of files increase your memory usage. The files are splitted in chunks and your peers share also your downloaded file and hold the data in their memory.

Source Code

This is an open-source project licensed under the MIT license.

Support

If you like this project, you can support me by buying me a coffee. Feature requests and bug reports are welcome.