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

@revdesk/webrtc

v0.1.2

Published

Official RevDesk browser-calling client. Place and receive calls in the browser through the RevDesk voice network.

Readme

@revdesk/webrtc

Official browser-calling client for RevDesk. Place and receive phone calls directly in the browser through the RevDesk voice network — one branded surface, two connection paths, zero infrastructure to run.

Install

npm install @revdesk/webrtc
# or: bun add @revdesk/webrtc

Pair it with @revdesk/sdk to issue the call tokens from your server.

Two paths, one surface

Both clients emit the same lifecycle events (callUpdate, error, ended) and the same CallState, so your UI doesn't change when you switch paths.

Browser-direct — RevDeskRTC

The browser connects to the RevDesk voice network and places the call itself.

import { RevDeskRTC } from "@revdesk/webrtc";

// Token issued server-side via @revdesk/sdk: revdesk.webrtc.getToken({ from_number, to_number })
const call = new RevDeskRTC({ token });

call.on("callUpdate", ({ state }) => console.log(state)); // connecting → ringing → active → ended
call.on("error", (err) => console.error(err.code, err.message));

await call.connect();
call.dial({ to: "+15554560000", from: "+15551230000" });

// later…
call.mute();
call.sendDTMF("1"); // out-of-band IVR input; no local keypad tone is mixed into the mic
call.hangup();

RevDeskRTC also emits structured Telnyx media warnings so packet loss, jitter, low audio, and recovery events can be tied to a specific test call without collecting audio or network addresses:

call.on("qualityWarning", ({ code, name, message }) => {
  console.warn(code, name, message);
});

// Aggregated counts, codec preference, and remote-playback recovery attempts.
console.log(call.getQualityReport());

Relay — RevDeskRoom

RevDesk places the outbound call and the browser joins it. The browser never touches the destination network directly.

import { RevDeskRoom } from "@revdesk/webrtc";

// Token issued server-side: revdesk.webrtc.getRoomToken({ from_number, to_number })
const call = new RevDeskRoom({ token, roomUrl, callId });

call.on("callUpdate", ({ state }) => console.log(state));
await call.join();

call.setMuted(true);
call.leave();

Call state

callUpdate carries the current state:

| State | Meaning | | -------------- | -------------------------------------- | | idle | created, not started | | connecting | establishing the connection | | ringing | placed, awaiting the other party | | active | connected, audio flowing | | held | active call temporarily on hold | | reconnecting | media recovering after an interruption | | ended | finished normally | | error | failed (see the error event) |

Errors

The error event delivers a RevDeskCallError with a machine-readable code (connection_failed, connection_timeout, call_rejected, …):

import { RevDeskCallError } from "@revdesk/webrtc";

call.on("error", (err: RevDeskCallError) => {
  if (err.code === "call_rejected") {
    /* the destination declined */
  }
});

Audio element (RevDeskRTC)

By default RevDeskRTC manages remote audio for you. To route it to a specific element, pass one:

new RevDeskRTC({ token, remoteAudioElement: document.querySelector("audio")! });

License

MIT