rtcpeerconnection
Advanced tools
Comparing version 2.1.1 to 2.2.0
{ | ||
"name": "rtcpeerconnection", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"description": "A tiny browser module that normalizes and simplifies the API for WebRTC peer connections.", | ||
@@ -21,3 +21,3 @@ "main": "rtcpeerconnection.js", | ||
"webrtcsupport": "0.7.x", | ||
"traceablepeerconnection": "0.1.x", | ||
"traceablepeerconnection": "0.2.x", | ||
"sdp-jingle-json": "1.x", | ||
@@ -24,0 +24,0 @@ "underscore": "1.x" |
@@ -361,2 +361,33 @@ var _ = require('underscore'); | ||
// a wrapper around getStats which hides the differences (where possible) | ||
PeerConnection.prototype.getStats = function (cb) { | ||
if (webrtc.prefix === 'moz') { | ||
this.pc.getStats( | ||
function (res) { | ||
var items = []; | ||
res.forEach(function (result) { | ||
items.push(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); | ||
}); | ||
} | ||
}; | ||
module.exports = PeerConnection; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135144
11
3617
+ Addedtraceablepeerconnection@0.2.3(transitive)
- Removedtraceablepeerconnection@0.1.5(transitive)