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 - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "spreadcast",
"version": "0.1.1",
"version": "0.1.2",
"description": "Broadcast a WebRTC stream to many subscribers",

@@ -5,0 +5,0 @@ "main": "src/spreadcast.js",

@@ -24,7 +24,8 @@ var _ = require('eakwell');

var socket;
var sockReady;
var socketReady;
var shutdown = false;
var openSocket = function() {
socket = new WebSocket(wsUrl);
sockReady = new Promise(function(ok, fail) {
socketReady = new Promise(function(ok, fail) {
socket.onopen = function(event) {

@@ -42,5 +43,7 @@ console.log("Socket open");

console.log('WebSocket was closed', event);
if(shutdown) return;
// Reconnect socket and stream
_.defer(function() {
openSocket();
if(senderPeer) sockReady.then(reconnect);
if(senderPeer) socketReady.then(reconnect);
}, 1000);

@@ -109,3 +112,3 @@ };

var send = function(data) {
sockReady.then(function() {
socketReady.then(function() {
data._spreadcast = true;

@@ -171,2 +174,4 @@ socket.send(JSON.stringify(data));

remoteVideo = null;
shutdown = true;
socket.close();
};

@@ -173,0 +178,0 @@

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