# spreadcast

> Broadcast WebRTC streams to many receivers

Latest version **0.2.2** (published 2017-02-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install spreadcast
pnpm add spreadcast
yarn add spreadcast
bun add spreadcast
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2017-02-02 |
| First published | 2016-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Björn Breitgoff |
| Maintainers | syntheticore |
| Keywords | webrtc, broadcast, media server |

## Links

- npm: https://www.npmjs.com/package/spreadcast
- Repository: https://github.com/syntheticore/spreadcast
- Homepage: https://github.com/syntheticore/spreadcast#readme
- Issues: https://github.com/syntheticore/spreadcast/issues
- npm.io page: https://npm.io/package/spreadcast

## Dependencies (6)

- [ws](https://npm.io/package/ws.md) ^1.1.1
- [eakwell](https://npm.io/package/eakwell.md) ^0.2.6
- [freeice](https://npm.io/package/freeice.md) ^2.2.0
- [bufferutil](https://npm.io/package/bufferutil.md) ^1.3.0
- [utf-8-validate](https://npm.io/package/utf-8-validate.md) ^2.0.0
- [webrtc-adapter](https://npm.io/package/webrtc-adapter.md) ^2.1.0

## Recent versions

- 0.2.2 (latest) — 2017-02-02
- 0.2.1 — 2017-01-22
- 0.2.0 — 2017-01-15
- 0.1.10 — 2016-12-29
- 0.1.9 — 2016-12-26
- 0.1.8 — 2016-12-26
- 0.1.7 — 2016-12-24
- 0.1.6 — 2016-12-22
- 0.1.5 — 2016-12-21
- 0.1.4 — 2016-12-19
- 0.1.3 — 2016-12-18
- 0.1.2 — 2016-12-18
- 0.1.1 — 2016-12-18
- 0.1.0 — 2016-12-18
- 0.0.5 — 2016-12-18
- … 4 more at https://npm.io/package/spreadcast/versions

## README

# spreadcast.js
[![npm version](https://badge.fury.io/js/spreadcast.svg)](http://badge.fury.io/js/spreadcast)

Broadcast WebRTC streams to many receivers

## Installation

  npm install spreadcast --save

## Usage
  
  # Node Server

  ```JavaScript
  var Spreadcast = require('spreadcast');

  var server = require('http').createServer();
  server.listen();

  Spreadcast.serve({server: server});
  ```


  # Browser Client

  ```JavaScript
  // If you use Browserify in your project already,
  // you can require spreadcast directly

  var spreadcast = require('spreadcast');

  // Otherwise include the bundle from
  // ./node_modules/spreadcast/dist/spreadcast.min.js in your HTML

  // Use the Room class to easily implement a video chat
  // among several publishers with many viewers

  var room = new spreadcast.Room('roomName');

  room.onAddStream = function(video) {
    document.body.appendChild(video);
  };

  room.onRemoveStream = function(video) {
    video.parentElement.removeChild(video);
  };

  // Call publish/unpublish at any time
  // You can pass a regular WebRTC constraints object to configure your stream
  room.publish({
    video: {
      width: 320,
      height: 240,
      frameRate: 24
    }
  }).then(function(video) {
    document.body.appendChild(video);
  }).catch(function(error) {
    console.error(error);
  });
  ```

## License

  MIT

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