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

webrtc-adapter

Package Overview
Dependencies
Maintainers
3
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 7.0.0 to 7.0.1

5

dist/edge/edge_shim.js

@@ -105,5 +105,4 @@ /*

if (config && config.iceServers) {
// TODO: pass browserDetails.version again. See #903 for
// why this is not done.
config.iceServers = (0, _filtericeservers.filterIceServers)(config.iceServers);
config.iceServers = (0, _filtericeservers.filterIceServers)(config.iceServers, browserDetails.version);
utils.log('ICE servers after filtering:', config.iceServers);
}

@@ -110,0 +109,0 @@ return new RTCPeerConnectionShim(config);

10

dist/edge/filtericeservers.js

@@ -41,9 +41,13 @@ /*

urls = urls.filter(function (url) {
var validTurn = url.startsWith('turn') && !url.startsWith('turn:[') && url.includes('transport=udp') && !hasTurn;
// filter STUN unconditionally.
if (url.indexOf('stun:') === 0) {
return false;
}
if (validTurn) {
var validTurn = url.startsWith('turn') && !url.startsWith('turn:[') && url.includes('transport=udp');
if (validTurn && !hasTurn) {
hasTurn = true;
return true;
}
return url.indexOf('stun:') === 0 && edgeVersion >= 14393 && url.indexOf('?transport=udp') === -1;
return validTurn && !hasTurn;
});

@@ -50,0 +54,0 @@

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

@@ -25,3 +25,3 @@ "license": "BSD-3-Clause",

"dependencies": {
"rtcpeerconnection-shim": "^1.2.14",
"rtcpeerconnection-shim": "^1.2.15",
"sdp": "^2.9.0"

@@ -39,4 +39,4 @@ },

"grunt": "^1.0.3",
"grunt-babel": "^7.0.0",
"grunt-browserify": "^5.3.0",
"grunt-babel": "^7.0.0",
"grunt-cli": "^1.3.1",

@@ -47,3 +47,3 @@ "grunt-contrib-clean": "^1.1.0",

"grunt-shell": "^2.1.0",
"karma": "^3.0.0",
"karma": "^3.1.3",
"karma-browserify": "^5.2.0",

@@ -50,0 +50,0 @@ "karma-chai": "^0.1.0",

@@ -62,3 +62,3 @@ [![Build Status](https://travis-ci.org/webrtcHacks/adapter.svg)](https://travis-ci.org/webrtc/adapter)

* Go back to your checkout and run `git pull`
* Run `npm publish` (you need access to the [webrtc-adapter npmjs package](https://www.npmjs.com/package/webrtc-adapter))
* Run `npm publish` (you need access to the [webrtc-adapter npmjs package](https://www.npmjs.com/package/webrtc-adapter)). For big changes, consider using a [tag version](https://docs.npmjs.com/adding-dist-tags-to-packages) such as `next`.
* Done! There should now be a new release published to NPM and the gh-pages branch.

@@ -65,0 +65,0 @@

@@ -75,5 +75,5 @@ /*

if (config && config.iceServers) {
// TODO: pass browserDetails.version again. See #903 for
// why this is not done.
config.iceServers = filterIceServers(config.iceServers);
config.iceServers = filterIceServers(config.iceServers,
browserDetails.version);
utils.log('ICE servers after filtering:', config.iceServers);
}

@@ -80,0 +80,0 @@ return new RTCPeerConnectionShim(config);

@@ -31,13 +31,15 @@ /*

urls = urls.filter(url => {
// filter STUN unconditionally.
if (url.indexOf('stun:') === 0) {
return false;
}
const validTurn = url.startsWith('turn') &&
!url.startsWith('turn:[') &&
url.includes('transport=udp') &&
!hasTurn;
if (validTurn) {
url.includes('transport=udp');
if (validTurn && !hasTurn) {
hasTurn = true;
return true;
}
return url.indexOf('stun:') === 0 && edgeVersion >= 14393 &&
url.indexOf('?transport=udp') === -1;
return validTurn && !hasTurn;
});

@@ -44,0 +46,0 @@

@@ -52,6 +52,6 @@ /*

const result = filterIceServers([
{url: 'stun:stun.l.google.com'}
{url: 'turn:stun.l.google.com:19302?transport=udp'}
], edgeVersion);
expect(result).to.deep.equal([
{urls: 'stun:stun.l.google.com'}
{urls: 'turn:stun.l.google.com:19302?transport=udp'}
]);

@@ -67,9 +67,7 @@ });

it('does not filter STUN without protocol after r14393', () => {
it('does filter STUN without protocol after r14393', () => {
const result = filterIceServers([
{urls: 'stun:stun.l.google.com'}
], edgeVersion);
expect(result).to.deep.equal([
{urls: 'stun:stun.l.google.com'}
]);
expect(result).to.deep.equal([]);
});

@@ -107,3 +105,2 @@

expect(result).to.deep.equal([
{urls: 'stun:stun.l.google.com'},
{urls: 'turn:stun.l.google.com:19301?transport=udp'}

@@ -115,3 +112,2 @@ ]);

const result = filterIceServers([
{urls: 'stun:stun.l.google.com'},
{urls: [

@@ -123,3 +119,2 @@ 'turn:stun.l.google.com:19301?transport=udp',

expect(result).to.deep.equal([
{urls: 'stun:stun.l.google.com'},
{urls: ['turn:stun.l.google.com:19301?transport=udp']}

@@ -126,0 +121,0 @@ ]);

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