1.0.2 • Published 9 years ago

rtc-data-stream v1.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

rtc-data-stream

convert a reliable RTCDataChannel into a stream.

use HTML5 WebRTC the node way -- with streams.

use

you can use browserify to package this module for browser use.

var rtcDataStream = require('rtc-data-stream')
var quickconnect = require('rtc-quickconnect')

quickconnect('http://rtc.io/switchboard', { room: 'rtc-data-stream-demo' })
  .createDataChannel('chat')
  .on('channel:opened:chat', function(peerId, channel) {
    
    rtcDataStream(channel)
      .pipe(somewhereAwesome)

  })

demo

Open this demo 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 by max ogden

license

MIT LICENSE

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.0.2

10 years ago

0.0.1

11 years ago

0.0.0

11 years ago