webrtc-adapter
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -730,5 +730,17 @@ (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){ | ||
// Leave callback version alone; misc old uses of forEach before Map | ||
stats.forEach(function(stat) { | ||
stat.type = modernStatsTypes[stat.type] || stat.type; | ||
}); | ||
try { | ||
stats.forEach(function(stat) { | ||
stat.type = modernStatsTypes[stat.type] || stat.type; | ||
}); | ||
} catch (e) { | ||
if (e.name !== 'TypeError') { | ||
throw e; | ||
} | ||
// Avoid TypeError: "type" is read-only, in old versions. 34-43ish | ||
stats.forEach(function(stat, i) { | ||
stats.set(i, Object.assign({}, stat, { | ||
type: modernStatsTypes[stat.type] || stat.type | ||
})); | ||
}); | ||
} | ||
} | ||
@@ -735,0 +747,0 @@ return stats; |
@@ -730,5 +730,17 @@ (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){ | ||
// Leave callback version alone; misc old uses of forEach before Map | ||
stats.forEach(function(stat) { | ||
stat.type = modernStatsTypes[stat.type] || stat.type; | ||
}); | ||
try { | ||
stats.forEach(function(stat) { | ||
stat.type = modernStatsTypes[stat.type] || stat.type; | ||
}); | ||
} catch (e) { | ||
if (e.name !== 'TypeError') { | ||
throw e; | ||
} | ||
// Avoid TypeError: "type" is read-only, in old versions. 34-43ish | ||
stats.forEach(function(stat, i) { | ||
stats.set(i, Object.assign({}, stat, { | ||
type: modernStatsTypes[stat.type] || stat.type | ||
})); | ||
}); | ||
} | ||
} | ||
@@ -735,0 +747,0 @@ return stats; |
{ | ||
"name": "webrtc-adapter", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "A shim to insulate apps from WebRTC spec changes and browser prefix differences", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
@@ -388,4 +388,3 @@ /* | ||
if (transceiver.kind === 'video' | ||
&& transceiver.recvEncodingParameters | ||
&& browserDetails.version < 15019) { | ||
&& transceiver.recvEncodingParameters) { | ||
transceiver.recvEncodingParameters.forEach(function(p) { | ||
@@ -597,22 +596,2 @@ delete p.rtx; | ||
}); | ||
localCapabilities = RTCRtpReceiver.getCapabilities(kind); | ||
// filter RTX until additional stuff needed for RTX is implemented | ||
// in adapter.js | ||
localCapabilities.codecs = localCapabilities.codecs.filter( | ||
function(codec) { | ||
return codec.name !== 'rtx'; | ||
}); | ||
var commonCodecs = self._getCommonCapabilities( | ||
localCapabilities, | ||
remoteCapabilities).codecs; | ||
commonCodecs = commonCodecs.map(function(codec) { | ||
return codec.name; | ||
}); | ||
if (commonCodecs.length === 0 || | ||
(commonCodecs.indexOf('H264') === -1 && | ||
commonCodecs.indexOf('VP8') === -1)) { | ||
rejected = true; | ||
} | ||
if (description.type === 'offer' && !rejected) { | ||
@@ -629,3 +608,11 @@ var transports = self.usingBundle && sdpMLineIndex > 0 ? { | ||
localCapabilities = RTCRtpReceiver.getCapabilities(kind); | ||
// filter RTX until additional stuff needed for RTX is implemented | ||
// in adapter.js | ||
localCapabilities.codecs = localCapabilities.codecs.filter( | ||
function(codec) { | ||
return codec.name !== 'rtx'; | ||
}); | ||
sendEncodingParameters = [{ | ||
@@ -632,0 +619,0 @@ ssrc: (2 * sdpMLineIndex + 2) * 1001 |
@@ -161,5 +161,17 @@ /* | ||
// Leave callback version alone; misc old uses of forEach before Map | ||
stats.forEach(function(stat) { | ||
stat.type = modernStatsTypes[stat.type] || stat.type; | ||
}); | ||
try { | ||
stats.forEach(function(stat) { | ||
stat.type = modernStatsTypes[stat.type] || stat.type; | ||
}); | ||
} catch (e) { | ||
if (e.name !== 'TypeError') { | ||
throw e; | ||
} | ||
// Avoid TypeError: "type" is read-only, in old versions. 34-43ish | ||
stats.forEach(function(stat, i) { | ||
stats.set(i, Object.assign({}, stat, { | ||
type: modernStatsTypes[stat.type] || stat.type | ||
})); | ||
}); | ||
} | ||
} | ||
@@ -166,0 +178,0 @@ return stats; |
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
452329
11708