webrtc-adapter
Advanced tools
Comparing version 7.2.8 to 7.2.9
@@ -84,17 +84,20 @@ /* | ||
// support for addIceCandidate(null or undefined) | ||
var nativeAddIceCandidate = window.RTCPeerConnection.prototype.addIceCandidate; | ||
window.RTCPeerConnection.prototype.addIceCandidate = function addIceCandidate() { | ||
if (!arguments[0]) { | ||
if (arguments[1]) { | ||
arguments[1].apply(null); | ||
// as well as ignoring {sdpMid, candidate: ""} | ||
if (browserDetails.version < 68) { | ||
var nativeAddIceCandidate = window.RTCPeerConnection.prototype.addIceCandidate; | ||
window.RTCPeerConnection.prototype.addIceCandidate = function addIceCandidate() { | ||
if (!arguments[0]) { | ||
if (arguments[1]) { | ||
arguments[1].apply(null); | ||
} | ||
return Promise.resolve(); | ||
} | ||
return Promise.resolve(); | ||
} | ||
// Firefox 68+ emits and processes {candidate: "", ...}, ignore | ||
// in older versions. | ||
if (browserDetails.version < 68 && arguments[0] && arguments[0].candidate === '') { | ||
return Promise.resolve(); | ||
} | ||
return nativeAddIceCandidate.apply(this, arguments); | ||
}; | ||
// Firefox 68+ emits and processes {candidate: "", ...}, ignore | ||
// in older versions. | ||
if (arguments[0] && arguments[0].candidate === '') { | ||
return Promise.resolve(); | ||
} | ||
return nativeAddIceCandidate.apply(this, arguments); | ||
}; | ||
} | ||
@@ -101,0 +104,0 @@ var modernStatsTypes = { |
{ | ||
"name": "webrtc-adapter", | ||
"version": "7.2.8", | ||
"version": "7.2.9", | ||
"description": "A shim to insulate apps from WebRTC spec changes and browser prefix differences", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
@@ -55,20 +55,22 @@ /* | ||
// support for addIceCandidate(null or undefined) | ||
const nativeAddIceCandidate = | ||
window.RTCPeerConnection.prototype.addIceCandidate; | ||
window.RTCPeerConnection.prototype.addIceCandidate = | ||
function addIceCandidate() { | ||
if (!arguments[0]) { | ||
if (arguments[1]) { | ||
arguments[1].apply(null); | ||
// as well as ignoring {sdpMid, candidate: ""} | ||
if (browserDetails.version < 68) { | ||
const nativeAddIceCandidate = | ||
window.RTCPeerConnection.prototype.addIceCandidate; | ||
window.RTCPeerConnection.prototype.addIceCandidate = | ||
function addIceCandidate() { | ||
if (!arguments[0]) { | ||
if (arguments[1]) { | ||
arguments[1].apply(null); | ||
} | ||
return Promise.resolve(); | ||
} | ||
return Promise.resolve(); | ||
} | ||
// Firefox 68+ emits and processes {candidate: "", ...}, ignore | ||
// in older versions. | ||
if (browserDetails.version < 68 && | ||
arguments[0] && arguments[0].candidate === '') { | ||
return Promise.resolve(); | ||
} | ||
return nativeAddIceCandidate.apply(this, arguments); | ||
}; | ||
// Firefox 68+ emits and processes {candidate: "", ...}, ignore | ||
// in older versions. | ||
if (arguments[0] && arguments[0].candidate === '') { | ||
return Promise.resolve(); | ||
} | ||
return nativeAddIceCandidate.apply(this, arguments); | ||
}; | ||
} | ||
@@ -75,0 +77,0 @@ const modernStatsTypes = { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
8
847178
45
20276