# hypercast-browser.

> louiscenter/hypercast as a browser-only module.

Latest version **1.0.0** (published 2018-01-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install hypercast-browser.
pnpm add hypercast-browser.
yarn add hypercast-browser.
bun add hypercast-browser.
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-01-25 |
| First published | 2018-01-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Thomas Mullen |
| Maintainers | rationalcoding |

## Links

- npm: https://www.npmjs.com/package/hypercast-browser.
- npm.io page: https://npm.io/package/hypercast-browser.

## Dependencies (1)

- [mediastream-to-webm](https://npm.io/package/mediastream-to-webm.md) ^1.0.1

## Recent versions

- 1.0.0 (latest) — 2018-01-25

## README

# hypercast-browser

[louiscenter/hypercast](https://github.com/louiscenter/hypercast) refactored as a standalone browser-only module (no Electron!).

Both broadcasting and viewing requires [Beaker Browser](https://beakerbrowser.com/).

## Install
With Browserify:

```bash
npm install --save hypercast-browser
```

```javascript
var Hypercast = require('hypercast-browser')
```

Or without it:

```html
<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:

```javascript
{
    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:

```javascript
{
    videoElement: null // Specify this to provide your own video element
    mimeType: 'video/webm; codecs="opus,vp8"'
}
```

---
_Source: https://npm.io/package/hypercast-browser. · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
