louiscenter/hypercast refactored as a standalone browser-only module (no Electron!).
Both broadcasting and viewing requires Beaker Browser.
With Browserify:
npm install --save hypercast-browser
var Hypercast = require('hypercast-browser')
Or without it:
<script src="dist/hypercast.js"></script>
Broadcasts a new MediaStream over the Dat protocol. Returns a Dat URL of the stream archive.
mediaStream
- A WebRTC MediaStream.
opts
- Options object. Defaults are:
{
interval: 10
mimeType: 'video/webm; codecs="opus,vp8"'
}
Views a Hypercast stream via the Dat protocol. Returns a video element that will play the stream.
url
- Dat URL of stream archive. (Get this from broadcast
!)
opts
- Options object. Defaults are:
{
videoElement: null // Specify this to provide your own video element
mimeType: 'video/webm; codecs="opus,vp8"'
}