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

rtcpeerconnection

Package Overview
Dependencies
Maintainers
5
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtcpeerconnection - npm Package Compare versions

Comparing version 3.1.6 to 4.0.0

2

package.json
{
"name": "rtcpeerconnection",
"version": "3.1.6",
"version": "4.0.0",
"description": "A tiny browser module that normalizes and simplifies the API for WebRTC peer connections.",

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

@@ -816,36 +816,13 @@ var util = require('util');

// a wrapper around getStats which hides the differences (where possible)
// TODO: remove in favor of adapter.js shim
PeerConnection.prototype.getStats = function (cb) {
if (adapter.webrtcDetectedBrowser === 'firefox') {
this.pc.getStats(
function (res) {
var items = [];
for (var result in res) {
if (typeof res[result] === 'object') {
items.push(res[result]);
}
}
cb(null, items);
},
cb
);
} else {
this.pc.getStats(function (res) {
var items = [];
res.result().forEach(function (result) {
var item = {};
result.names().forEach(function (name) {
item[name] = result.stat(name);
});
item.id = result.id;
item.type = result.type;
item.timestamp = result.timestamp;
items.push(item);
});
cb(null, items);
});
}
this.pc.getStats(null,
function (res) {
cb(null, res);
},
function (err) {
cb(err);
}
);
};
module.exports = PeerConnection;

Sorry, the diff of this file is too big to display

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