Wondering what’s next for npm?Check out our public roadmap! »

    hypercast-browser.

    1.0.0 • Public • Published

    hypercast-browser

    louiscenter/hypercast refactored as a standalone browser-only module (no Electron!).

    Both broadcasting and viewing requires Beaker Browser.

    Install

    With Browserify:

    npm install --save hypercast-browser
    var Hypercast = require('hypercast-browser')

    Or without it:

    <script src="dist/hypercast.js"></script>

    API

    Hypercast.broadcast(mediaStream, opts)

    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"'
    }

    Hypercast.view(url, opts)

    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"'
    }

    Keywords

    none

    Install

    npm i hypercast-browser.

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar