webrtc-adapter
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -43,2 +43,12 @@ /*jslint node:true*/ | ||
var fixFirefoxStatsResponse = function(response) { | ||
// Giving the response directly to the callback gives an object w/o interface | ||
// https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings#ChromeOnly | ||
var standardReport = {}; | ||
response.forEach(function (report) { | ||
standardReport[report.id] = report; | ||
}); | ||
return standardReport; | ||
}; | ||
var sessionHasData = function(desc) { | ||
@@ -66,2 +76,11 @@ if (!desc) { | ||
// Firefox stats response is only visible 'ChromeOnly' so process it here | ||
var boundGetStats = pc.getStats.bind(pc); | ||
pc.getStats = function(selector, successCallback, failureCallback) { | ||
var successCallbackWrapper = function(firefoxStatsResponse) { | ||
successCallback(fixFirefoxStatsResponse(firefoxStatsResponse)); | ||
}; | ||
boundGetStats(selector, successCallbackWrapper, failureCallback); | ||
}; | ||
// Firefox doesn't fire 'onnegotiationneeded' when a data channel is created | ||
@@ -68,0 +87,0 @@ // https://bugzilla.mozilla.org/show_bug.cgi?id=840728 |
{ | ||
"name": "webrtc-adapter", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Commonjs adapter.js browser compatibility shim for webRTC", | ||
@@ -5,0 +5,0 @@ "main": "adapter.js", |
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
18997
137