Skip to main content

@pexip/peer-connection-stats

Helps with normalization of data from RTCStats and friends.

Install

npm install @pexip/peer-connection-stats

Related documentation:

Enumerations

EnumerationDescription
Quality-

Interfaces

InterfaceDescription
CacheStats-
CandidatePair-
Codec-
InboundAudio-
InboundVideo-
MediaSource-
Metrics-
OutboundAudio-
OutboundVideo-
Remote-
RTCStats-
StatsCollector-
StatsCollectorOptions-
StatsSignals-
Stream-
Track-
Transport-
VideoMetrics-

Type Aliases

Type AliasDescription
AnyStats-
AudioQualityStats-
CallPacketsStats-
CallQualityStats-
FPSStats-
InboundAudioMetrics-
InboundVideoMetrics-
NormalizedRTCStats-
OutboundAudioMetrics-
OutboundVideoMetrics-
PacketsStats-
VideoQualityStats-

Variables

VariableDescription
FPS_STATS_SIZE-
STATS_SIZE-

Functions

FunctionDescription
addDeltaStats-
calculateQuality-
createResolverThe WebRTC stats are given to us as a flat structure (an array of objects that contain id-fields pointing to other objects in the same array).
createStatsCollectorCreates stats collector
createStatsSignalsCreate and return all required and optional (if specified with more), signals for infinity client to work
getQuality-
inboundAudioNormalize inbound audio stats
inboundVideoNormalize inbound video stats
outboundAudioNormalize outbound audio stats
outboundVideoNormalize outbound video stats
statsFromNormalize stats into inbound and outbound video and audio stats
statsFromRTCPeerGets raw stats from peerConnection and normalized them