@pexip/peer-connection-stats
Helps with normalization of data from RTCStats and friends.
Install
npm install @pexip/peer-connection-stats
Related documentation:
- https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_Statistics_API
- https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
- https://developer.mozilla.org/en-US/docs/Web/API/RTCStats
Enumerations
| Enumeration | Description |
|---|---|
| Quality | - |
Interfaces
Type Aliases
Variables
| Variable | Description |
|---|---|
| FPS_STATS_SIZE | - |
| STATS_SIZE | - |
Functions
| Function | Description |
|---|---|
| addDeltaStats | - |
| calculateQuality | - |
| createResolver | The 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). |
| createStatsCollector | Creates stats collector |
| createStatsSignals | Create and return all required and optional (if specified with more), signals for infinity client to work |
| getQuality | - |
| inboundAudio | Normalize inbound audio stats |
| inboundVideo | Normalize inbound video stats |
| outboundAudio | Normalize outbound audio stats |
| outboundVideo | Normalize outbound video stats |
| statsFrom | Normalize stats into inbound and outbound video and audio stats |
| statsFromRTCPeer | Gets raw stats from peerConnection and normalized them |