@twilio/webrtc
Advanced tools
Comparing version 4.2.0 to 4.2.1
{ | ||
"type": "JavaScript", | ||
"travis": true, | ||
"ci": "circleci", | ||
"slug": "twilio/twilio-webrtc.js", | ||
@@ -5,0 +5,0 @@ "env": { |
@@ -0,1 +1,10 @@ | ||
4.2.1 (May 27, 2020) | ||
==================== | ||
Bug Fixes | ||
--------- | ||
- Fixed a bug where `packetsLost` and `roundTripTime` were reported inaccurately | ||
even though they were available in Chrome. (JSDK-2755, JSDK-2787, JSDK-2787) | ||
4.2.0 (February 21, 2020) | ||
@@ -2,0 +11,0 @@ ========================= |
@@ -166,3 +166,3 @@ 'use strict'; | ||
{ key: 'retransmissionsSent', type: 'number' }, | ||
{ key: 'state', type: 'string' }, | ||
{ key: 'state', type: 'string', fixup: function(state) { return state === 'inprogress' ? 'in-progress' : state; } }, | ||
{ key: 'totalRoundTripTime', type: 'number' }, | ||
@@ -173,3 +173,3 @@ { key: 'transportId', type: 'string' }, | ||
report[keyInfo.key] = typeof activeCandidatePairStats[keyInfo.key] === keyInfo.type | ||
? activeCandidatePairStats[keyInfo.key] | ||
? (keyInfo.fixup ? keyInfo.fixup(activeCandidatePairStats[keyInfo.key]) : activeCandidatePairStats[keyInfo.key]) | ||
: null; | ||
@@ -453,2 +453,4 @@ return report; | ||
var outbound = null; | ||
var remoteInbound = null; | ||
var remoteOutbound = null; | ||
var track = null; | ||
@@ -471,2 +473,8 @@ var codec = null; | ||
break; | ||
case 'remote-inbound-rtp': | ||
remoteInbound = stat; | ||
break; | ||
case 'remote-outbound-rtp': | ||
remoteOutbound = stat; | ||
break; | ||
} | ||
@@ -478,20 +486,16 @@ }); | ||
var first = isRemote ? inbound : outbound; | ||
var second = track; | ||
var third = codec; | ||
// setup sources to look for stat | ||
const statSources = [ | ||
isRemote ? inbound : outbound, // local rtp stats | ||
track, | ||
codec, | ||
isRemote ? remoteOutbound : remoteInbound // remote trp stats | ||
]; | ||
function getStatValue(name) { | ||
if (first && typeof first[name] !== 'undefined') { | ||
return first[name]; | ||
} | ||
const sourceFound = statSources.find(function(statSource) { | ||
return statSource && typeof statSource[name] !== 'undefined'; | ||
}) || null; | ||
if (second && typeof second[name] !== 'undefined') { | ||
return second[name]; | ||
} | ||
if (third && typeof third[name] !== 'undefined') { | ||
return third[name]; | ||
} | ||
return null; | ||
return sourceFound ? sourceFound[name] : null; | ||
} | ||
@@ -515,3 +519,3 @@ | ||
if (typeof roundTripTime === 'number') { | ||
standardizedStats.roundTripTime = roundTripTime; | ||
standardizedStats.roundTripTime = Math.round(roundTripTime * 1000); | ||
} | ||
@@ -667,3 +671,6 @@ | ||
if (typeof roundTripTime === 'number') { | ||
standardizedStats.roundTripTime = roundTripTime; | ||
// roundTripTime is double - measured in seconds. | ||
// https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteinboundrtpstreamstats-roundtriptime | ||
// cover it to milliseconds (and make it integer) | ||
standardizedStats.roundTripTime = Math.round(roundTripTime * 1000); | ||
} | ||
@@ -670,0 +677,0 @@ |
{ | ||
"name": "@twilio/webrtc", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "WebRTC-related APIs and shims used by twilio-video.js", | ||
@@ -28,3 +28,4 @@ "scripts": { | ||
"Mark Roberts <mroberts@twilio.com>", | ||
"Ryan Rowland <rrowland@twilio.com>" | ||
"Ryan Rowland <rrowland@twilio.com>", | ||
"Makarand Patwardhan <mpatwardhan@twilio.com>" | ||
], | ||
@@ -42,2 +43,3 @@ "license": "BSD-3-Clause", | ||
"eslint": "^4.4.1", | ||
"is-docker": "^2.0.0", | ||
"istanbul": "^0.4.5", | ||
@@ -47,4 +49,7 @@ "karma": "^1.7.0", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-edgium-launcher": "^4.0.0-0", | ||
"karma-electron": "^6.1.0", | ||
"karma-firefox-launcher": "^1.0.1", | ||
"karma-htmlfile-reporter": "^0.3.8", | ||
"karma-junit-reporter": "^1.2.0", | ||
"karma-mocha": "^1.3.0", | ||
@@ -55,5 +60,6 @@ "karma-safari-launcher": "~0.1", | ||
"npm-run-all": "^4.0.2", | ||
"release-tool": "^0.2.2", | ||
"twilio-release-tool": "^1.0.0", | ||
"rimraf": "^2.6.1", | ||
"travis-multirunner": "^4.2.3", | ||
"simple-git": "^2.4.0", | ||
"watchify": "^3.9.0", | ||
@@ -60,0 +66,0 @@ "webrtc-adapter": "^6.4.8" |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
129629
28
2900
25
2
1