Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kumavis/rtc-data-stream
:bamboo: convert a webRTC connection into a stream
https://github.com/kumavis/rtc-data-stream
Last synced: about 2 months ago
JSON representation
:bamboo: convert a webRTC connection into a stream
- Host: GitHub
- URL: https://github.com/kumavis/rtc-data-stream
- Owner: kumavis
- Created: 2013-10-17T06:52:40.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-09-08T05:38:54.000Z (over 7 years ago)
- Last Synced: 2024-10-19T03:58:40.586Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 43
- Watchers: 6
- Forks: 7
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-peer-to-peer - rtc-data-stream
- awesome-peer-to-peer - rtc-data-stream
README
# rtc-data-stream
convert a reliable [RTCDataChannel](http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcdatachannel) into a stream.
use HTML5 [WebRTC](http://www.webrtc.org/) the node way -- with streams.
## use
you can use [browserify](http://github.com/substack/node-browserify) to package this module for browser use.```javascript
var rtcDataStream = require('rtc-data-stream')
var quickconnect = require('rtc-quickconnect')quickconnect('https://switchboard.rtc.io/', { room: 'rtc-data-stream-demo' })
.createDataChannel('chat')
.on('channel:opened:chat', function(peerId, channel) {
rtcDataStream(channel)
.pipe(somewhereAwesome)})
```## demo
Open [this demo](http://requirebin.com/?gist=1ac2891d276ae07e46cd) in two windows to start a chat over rtc-data-stream## hack
```
# install beefy
npm install -g beefy
# clone repo
git clone https://github.com/kumavis/rtc-data-stream
cd rtc-data-stream
# install dev dependencies
npm install
# start the example
npm start
# open another tab with the generated link
```## credit
Based on [websocket-stream](https://github.com/maxogden/websocket-stream) by [max ogden](https://twitter.com/maxogden)## license
MIT LICENSE