All Projects → vardius → peer-data

vardius / peer-data

Licence: MIT license
Library for files, media streaming/sharing using WebRTC

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
CSS
56736 projects

Projects that are alternatives of or similar to peer-data

Ios P2p Engine
Let your viewers become your unlimitedly scalable CDN.
Stars: ✭ 31 (-52.31%)
Mutual labels:  peer
Raft.net
Implementation of RAFT distributed consensus algorithm among TCP Peers on .NET / .NETStandard / .NETCore / dotnet
Stars: ✭ 112 (+72.31%)
Mutual labels:  peer
Appnet.link
Secure P2P HTTP Gateway as Tunnel Protocol
Stars: ✭ 203 (+212.31%)
Mutual labels:  peer
Discovery Swarm Webrtc
discovery-swarm for WebRTC
Stars: ✭ 56 (-13.85%)
Mutual labels:  peer
Libcrtc
WebRTC C++ library built on top of chromium webrtc.
Stars: ✭ 89 (+36.92%)
Mutual labels:  peer
P2p Cdn Sdk Javascript
Free p2p cdn github javascript sdk to reduce video streaming costs of live and on demand video using webrtc by upto 90% and improve scalability by 6x - 🚀 Vadootv 🚀
Stars: ✭ 158 (+143.08%)
Mutual labels:  peer
Lnbook
Mastering the Lightning Network (LN)
Stars: ✭ 931 (+1332.31%)
Mutual labels:  peer
P2p Graph
Real-time P2P network visualization with D3
Stars: ✭ 245 (+276.92%)
Mutual labels:  peer
Ut metadata
BitTorrent Extension for Peers to Send Metadata Files (BEP 9)
Stars: ✭ 98 (+50.77%)
Mutual labels:  peer
Blindpad
Collaborative text editor (like Google Docs or CoderPad) with integrated semi-anonymizing voice chat intended to help reduce bias in technical communication.
Stars: ✭ 191 (+193.85%)
Mutual labels:  peer
Android P2p Engine
Let your viewers become your unlimitedly scalable CDN.
Stars: ✭ 70 (+7.69%)
Mutual labels:  peer
Dotcoin
A simple and integrity blockchain implementation in Golang
Stars: ✭ 89 (+36.92%)
Mutual labels:  peer
Torrent Discovery
Discover BitTorrent and WebTorrent peers
Stars: ✭ 177 (+172.31%)
Mutual labels:  peer
Bittorrent Dht
🕸 Simple, robust, BitTorrent DHT implementation
Stars: ✭ 1,004 (+1444.62%)
Mutual labels:  peer
Peer Base
Build real-time collaborative DApps on top of IPFS
Stars: ✭ 208 (+220%)
Mutual labels:  peer
Install Self Peers
Stars: ✭ 26 (-60%)
Mutual labels:  peer
Openki
We moved to GitLab 💔 Openki is a tool to build up and organize local communities – Open education for real.
Stars: ✭ 137 (+110.77%)
Mutual labels:  peer
Megacoin
Welcome to Megacoin MΣC - Around the World!
Stars: ✭ 16 (-75.38%)
Mutual labels:  peer
Ipfs Pubsub Room
IPFS Pubsub room
Stars: ✭ 229 (+252.31%)
Mutual labels:  peer
Peering Manager
Peering sessions management tool
Stars: ✭ 189 (+190.77%)
Mutual labels:  peer

PeerData

Build Status npm version npm downloads license

logo

PeerData is a library for bidirectional peer-to-peer transfers of arbitrary data using RTCDataChannel. Simple WebRTC wrapper providing data channel abstraction.

WebRTC needs a messaging service to set up and maintain a WebRTC call.

The sender and receiver RTCPeerConnections run in web pages on different devices, and we need a way for them to communicate metadata. For this, we use a signaling server: a server that can pass messages between WebRTC clients (peers).

PeerDataServer - An ready to use example of signaling server on Node using socket.io.

📖 ABOUT

Contributors:

Want to contribute ? Feel free to send pull requests!

Have problems, bugs, feature ideas? We are using the github issue tracker to manage them.

📚 Documentation

For documentation (including examples), visit rafallorenz.com/peer-data

🚏 HOW TO USE

  1. Chat Example
  2. React Chat Example
  3. React Hook

Installation

$ npm install peer-data

Basic example

import PeerData, { EventDispatcher, SocketChannel } from 'peer-data';

const constraints = {ordered: true};
const servers = {
  iceServers: [
    {urls: "stun:stun.1.google.com:19302"}
  ]
};

const dispatcher = new EventDispatcher();
const peerData = new PeerData(dispatcher, servers, constraints);
const signaling = new SocketChannel(dispatcher, 'http://localhost:8080');

const room = peerData.connect('test-room');

room.on("participant", participant => {
  participant.on("message", payload => console.log("message", payload));

  participant.send('Hi mate! this is private message.');
})

For how to disconnect, close connection and handle errors please check documentation.

📜 License

This package is released under the MIT license. See the complete license in the package

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].