https://github.com/ojack/rtc-patch-bay
https://github.com/ojack/rtc-patch-bay
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/ojack/rtc-patch-bay
- Owner: ojack
- Created: 2018-03-14T20:14:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-27T16:08:09.000Z (about 8 years ago)
- Last Synced: 2025-03-13T13:19:49.638Z (over 1 year ago)
- Language: JavaScript
- Size: 2.24 MB
- Stars: 18
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
RTC Patch Bay
Module built on top of SimplePeer to handle ad-hoc connections with multiple peers. Uses a signaling server (patch-bay-server) to define a "room" or "channel" for connecting. Peers in the same room can choose to connect to all other peers in the same room (i.e. in a conference call), or can create and remove peer connections as needed.
Messages to other peers are sent via data channels when possible, or via websockets when a connection between to peers has not yet been established.
Options:
id: unique id for this user (if not supplied, will be generated)
peerOptions: default connection options to be sent to SimplePeer
room: room or channel name
stream: stream to share with peers
Methods:
ob.sendToAll(data)
Sends to all peers connected via WebRTC (NOT to all in room. See pb.broadcast())