Skip to content

Thin abstraction layer above peerjs that will let you be more productive at making WebRTC data channels based apps.

License

Notifications You must be signed in to change notification settings

topheman/webrtc-remote-control

Repository files navigation

webrtc-remote-control

ci Conventional Commits Demo

Implementations

Package Version
@webrtc-remote-control/core npm
@webrtc-remote-control/react npm
@webrtc-remote-control/vue npm

The problem

PeerJS is a great layer of abstraction above WebRTC with a simple API, though, you still need to:

  • track your connections
  • handle reconnects of peers when your page reloads

You don't want to think about this kind of networking problems, you want to focus on your app logic.

webrtc-remote-control handles all of that.

The use case

webrtc-remote-control was made to handle star topology network:

You have:

  • One "master" page connected to
  • Multiple "remote" pages

What you can do (through data-channel):

  • From "master" page, you can send data to any or all "remote" pages
  • From one "remote" page, you can send data to the master page

When "master" page drops connection (the page closes or reloads), the "remote" pages are notified (and remote automatically reconnect when master retrieves connection).

When a "remote" page drops connection (the page closes or reloads), the "master" page gets notified (and the remote reconnects to master as soon as it reloads).

Genesis

A few years ago I made topheman/webrtc-experiments, as a proof of concept for WebRTC data-channels relying on PeerJS.

About

Thin abstraction layer above peerjs that will let you be more productive at making WebRTC data channels based apps.

Topics

Resources

License

Stars

Watchers

Forks

Packages