Socket
Socket
Sign inDemoInstall

webrtc-stats-gatherer

Package Overview
Dependencies
0
Maintainers
3
Versions
109
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    webrtc-stats-gatherer

Gathers stats on interval for webrtc peer connection


Version published
Weekly downloads
541
increased by55.91%
Maintainers
3
Install size
73.8 kB
Created
Weekly downloads
 

Changelog

Source

v9.0.8

Fixed

  • PCM-2326 - Stop stats gathering if the session ends in "fail" state

Readme

Source

WebRTC Stats Gatherer

Greenkeeper badge

Build Status

Coverage Status

This module is designed to collect RTCPeerConnection stats on a regular interval and emit stats and trace data as appropriate.

Note that this project makes use of event emitting capabilities of RTCPeerConnection as opposed to a raw browser RTCPeerConnection.

API

constructor(peerConnection: RTCPeerConnection, opts: StatsGathererOpts)

interface StatsGathererOpts {
  session?: string;     // sessionId
  initiator?: string;
  conference?: string;  // conversationId
  interval?: number;    // interval, in seconds, at which stats are polled (default to 5)
  logger?: any;         // defaults to console
}

Usage

import StatsGatherer from 'webrtc-stats-gatherer';

const gatherer = new StatsGatherer(myPeerConnection);
gatherer.on('stats', (statsEvent) => doSomethingWithStats(statsEvent));

Keywords

FAQs

Last updated on 08 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc