Socket
Socket
Sign inDemoInstall

webrtc-adapter

Package Overview
Dependencies
Maintainers
4
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtc-adapter - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

18

out/adapter_no_edge_no_global.js

@@ -343,4 +343,9 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

RTCPeerConnection.prototype.addIceCandidate = function() {
return arguments[0] === null ? Promise.resolve()
: nativeAddIceCandidate.apply(this, arguments);
if (arguments[0] === null) {
if (arguments[1]) {
arguments[1].apply(null);
}
return Promise.resolve();
}
return nativeAddIceCandidate.apply(this, arguments);
};

@@ -684,4 +689,9 @@ }

RTCPeerConnection.prototype.addIceCandidate = function() {
return arguments[0] === null ? Promise.resolve()
: nativeAddIceCandidate.apply(this, arguments);
if (arguments[0] === null) {
if (arguments[1]) {
arguments[1].apply(null);
}
return Promise.resolve();
}
return nativeAddIceCandidate.apply(this, arguments);
};

@@ -688,0 +698,0 @@

@@ -343,4 +343,9 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.adapter = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

RTCPeerConnection.prototype.addIceCandidate = function() {
return arguments[0] === null ? Promise.resolve()
: nativeAddIceCandidate.apply(this, arguments);
if (arguments[0] === null) {
if (arguments[1]) {
arguments[1].apply(null);
}
return Promise.resolve();
}
return nativeAddIceCandidate.apply(this, arguments);
};

@@ -684,4 +689,9 @@ }

RTCPeerConnection.prototype.addIceCandidate = function() {
return arguments[0] === null ? Promise.resolve()
: nativeAddIceCandidate.apply(this, arguments);
if (arguments[0] === null) {
if (arguments[1]) {
arguments[1].apply(null);
}
return Promise.resolve();
}
return nativeAddIceCandidate.apply(this, arguments);
};

@@ -688,0 +698,0 @@

{
"name": "webrtc-adapter",
"version": "2.0.5",
"version": "2.0.6",
"description": "A shim to insulate apps from WebRTC spec changes and browser prefix differences",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

@@ -246,4 +246,9 @@

RTCPeerConnection.prototype.addIceCandidate = function() {
return arguments[0] === null ? Promise.resolve()
: nativeAddIceCandidate.apply(this, arguments);
if (arguments[0] === null) {
if (arguments[1]) {
arguments[1].apply(null);
}
return Promise.resolve();
}
return nativeAddIceCandidate.apply(this, arguments);
};

@@ -250,0 +255,0 @@ }

@@ -117,2 +117,3 @@ /*

}
this._config = config;

@@ -165,2 +166,6 @@ // per-track iceGathers, iceTransports, dtlsTransports, rtpSenders, ...

window.RTCPeerConnection.prototype.getConfiguration = function() {
return this._config;
};
window.RTCPeerConnection.prototype.addStream = function(stream) {

@@ -211,4 +216,6 @@ // Clone is necessary for local demos mostly, attaching directly

if (lCodec.name.toLowerCase() === rCodec.name.toLowerCase() &&
lCodec.clockRate === rCodec.clockRate &&
lCodec.numChannels === rCodec.numChannels) {
lCodec.clockRate === rCodec.clockRate) {
// number of channels is the highest common number of channels
rCodec.numChannels = Math.min(lCodec.numChannels,
rCodec.numChannels);
// push rCodec so we reply with offerer payload type

@@ -927,2 +934,10 @@ commonCapabilities.codecs.push(rCodec);

});
localCapabilities.codecs.forEach(function(codec) {
// work around https://bugs.chromium.org/p/webrtc/issues/detail?id=6552
// by adding level-asymmetry-allowed=1
if (codec.name === 'H264' &&
codec.parameters['level-asymmetry-allowed'] === undefined) {
codec.parameters['level-asymmetry-allowed'] = '1';
}
});

@@ -929,0 +944,0 @@ var rtpSender;

@@ -124,4 +124,9 @@ /*

RTCPeerConnection.prototype.addIceCandidate = function() {
return arguments[0] === null ? Promise.resolve()
: nativeAddIceCandidate.apply(this, arguments);
if (arguments[0] === null) {
if (arguments[1]) {
arguments[1].apply(null);
}
return Promise.resolve();
}
return nativeAddIceCandidate.apply(this, arguments);
};

@@ -128,0 +133,0 @@

Sorry, the diff of this file is not supported yet

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

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