Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spreadcast

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spreadcast

Broadcast WebRTC streams to many receivers

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-54.55%
Maintainers
1
Weekly downloads
 
Created
Source

spreadcast.js

npm version

Broadcast WebRTC streams to many receivers

Installation

npm install spreadcast --save

Usage

Node Server

var Spreadcast = require('spreadcast');

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

Spreadcast.serve({server: server});

Browser Client

// 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

Keywords

FAQs

Package last updated on 02 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc