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

webrtc-swarm

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtc-swarm - npm Package Compare versions

Comparing version 2.7.0 to 2.8.0

3

index.js

@@ -21,2 +21,3 @@ var SimplePeer = require('simple-peer')

this.wrtc = opts.wrtc
this.channelConfig = opts.channelConfig
this.config = opts.config

@@ -133,2 +134,3 @@ this.stream = opts.stream

initiator: true,
channelConfig: swarm.channelConfig,
config: swarm.config,

@@ -160,2 +162,3 @@ stream: swarm.stream,

wrtc: swarm.wrtc,
channelConfig: swarm.channelConfig,
config: swarm.config,

@@ -162,0 +165,0 @@ stream: swarm.stream,

2

package.json
{
"name": "webrtc-swarm",
"version": "2.7.0",
"version": "2.8.0",
"description": "Create a swarm of p2p connections using webrtc and a signalhub",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -45,10 +45,21 @@ # webrtc-swarm

Valid keys for `opts` include
Valid keys for `opts` include:
- `wrtc` - (optional) a reference to the `wrtc` library, if using Node.
- `uuid` - (optional) a unique identifier for this peer. One is generated for you
if not supplied.
- `uuid` - (optional) a unique identifier for this peer. One is generated for
you if not supplied.
- `maxPeers` - (optional) the maximum number of peers you wish to connect to.
Defaults to unlimited.
Additional optional keys can be passed through to the underlying
[simple-peer](https://www.npmjs.com/package/simple-peer) instances:
- `channelConfig` - custom webrtc data channel configuration (used by
`createDataChannel`)
- `config` - custom webrtc configuration (used by `RTCPeerConnection`
constructor)
- `stream` - if video/voice is desired, pass stream returned from
`getUserMedia`
### sw.close()

@@ -67,2 +78,4 @@

`peer` is a [simple-peer](https://www.npmjs.com/package/simple-peer) instance.
### sw.on('close')

@@ -69,0 +82,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