npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vpalmisano/webrtcperf-js

v1.1.17

Published

WebRTCPerf javascript browser library

Readme

WebRTC Perf javascript browser library

GitHub page | Documentation

A browser library used by the webrtcperf tool to capture the RTC logs and run page inspection/automation. It can also be used stand-alone importing the javascript package into the page before loading the other javascript sources. It contains some utilities to debug the page RTC connections, the getUserMedia and getDisplayMedia, evaluate the end-to-end delay, etc.

Import the library

<head>
  <script type="text/javascript" src="https://unpkg.com/@vpalmisano/webrtcperf-js/dist/webrtcperf.js"></script>
</head>

Userscript usage

The library can be used directly into a regular Google Chome browser session.

  1. Install Tampermonkey
  2. Install the User Script

Examples

Access the RTC PeerConnections objects

webrtcperf.PeerConnections

Get the current RTC stats

await webrtcperf.collectPeerConnectionStats(true)

Use a video as getUserMedia default source

Visit https://webrtc.github.io/samples/src/content/getusermedia/resolution/ with the tampermonkey script activated:

webrtcperf.config.MEDIA_URL = 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'
// Select one of the resolutions in the sample page.

To activate the option every time the page is loaded, you can set the following localStorage value:

localStorage.setItem('webrtcperf.config', JSON.stringify({
  MEDIA_URL: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
}))

Use a fake screenshare as getDisplayMedia source

await webrtcperf.startFakeScreenshare()
webrtcperf.overrides.getDisplayMedia = constraints => Object.assign(constraints, { preferCurrentTab: true })
// Start a screen sharing with getDisplayMedia.

Measure the audio and video end-to-end delay

Visit https://webrtc.github.io/samples/src/content/peerconnection/pc1/ with the tampermonkey script activated:

webrtcperf.config.MEDIA_URL = 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'
webrtcperf.params.timestampWatermarkVideo = true
webrtcperf.params.timestampWatermarkAudio = true
// Output:
// [webrtcperf-0] [e2e-video-stats] rx text=0-1743947998586 delay=44ms confidence=74 elapsed=73ms
// [webrtcperf-0] [e2e-audio-stats] rx delay: 71.33333333333326ms rxFrames: 62 rxFramesDuration: 1322.6666666666667ms

// Access the collected stats:
webrtcperf.videoEndToEndDelayStats
webrtcperf.audioEndToEndDelayStats

The library adds a video timestamp overlay at sender side and it recognizes the video at receiver side using Tesseract.js. The audio track at sender side is mixed with signals generated with the ggwave library; at receiver side, the same library is used do decode the received signals with the encoded sender timestamp. Sender and receiver machine clocks must be syncronized.