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.0.2 to 0.0.3

2

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

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

@@ -21,4 +21,10 @@ var _ = require('eakwell');

var wsUrl = location.origin.replace(/^http/, 'ws');
var socket = new WebSocket(wsUrl);
var wsUrl;
if(_.contains(location.origin, 'https')) {
wsUrl = location.origin.replace(/^https/, 'wss');
} else {
wsUrl = location.origin.replace(/^http/, 'ws');
}
var socket = Client.socket || new WebSocket(wsUrl);
Client.socket = socket;

@@ -25,0 +31,0 @@ var send = function(data) {

@@ -96,2 +96,3 @@ var _ = require('eakwell');

if(room.sender.id == sessionId) {
// Publisher went away -> Terminate stream
delete rooms[name];

@@ -108,3 +109,8 @@ _.each(room.receivers, function(receiver) {

} else if(room.receivers[sessionId]) {
// Remove receiver and leecher entries
delete room.receivers[sessionId];
delete room.sender.leechers[sessionId];
_.each(room.receivers, function(receiver) {
delete receiver.leechers[sessionId];
});
}

@@ -111,0 +117,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