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

ermis-wt

v9.0.0

Published

A starter for creating a TypeScript package.

Readme

ErmisWT (WebTransport Publisher SDK)

A TypeScript SDK for managing livestream sessions and publishing high-quality video/audio data using the WebTransport protocol.

Core Flow

  1. Initialize Session: Create a new livestream session to obtain a stream_id.
  2. Activate Stream: Activate the stream_id to get the stream_url (for WebTransport publishing) and the link (for HLS playback).
  3. Publish Data: Use WtPublisher to encode and send media data from the camera/microphone via the stream_url.
  4. Playback: View the livestream using the HLS player link in any supported browser or video player.

1. Session Management (ErmisWT)

Use the ErmisWT class to interact with the backend API for session control.

import { ErmisWT } from 'ermis-wt';

const client = new ErmisWT({
    token: 'YOUR_ACCESS_TOKEN',
    origin: 'https://api.your-service.com', // API Base URL
    prefix: '/stream-gate',                 // (Optional) API Prefix
    appName: 'my-app'                       // (Optional) Application Name
});

// 1. Create a new session
const streamId = await client.createLiveStreamSession('My-Livestream-Title');

// 2. Activate and retrieve connection info
const streamInfo = await client.activeStream(streamId);
console.log('Stream ID:', streamInfo.stream_id);
console.log('Stream Name:', streamInfo.stream_name);
console.log('Publish URL:', streamInfo.stream_url);
console.log('Player URL:', streamInfo.link);

// 3. Get list of all streams
const streams = await client.getListStream();
console.log('My Streams:', streams);

// 4. Deactivate when finished
// await client.deactivateStream(streamId);

2. Media Publishing (WtPublisher)

The WtPublisher class leverages the WebCodecs API for efficient encoding and WebTransport for ultra-low latency data transmission.

import { WtPublisher } from 'ermis-wt';

const publisher = new WtPublisher({
    streamUrl: streamInfo.stream_url, // Obtained from the activation step
    streamId: streamId,               // The ID of the stream
    videoCodec: 'avc1',               // 'avc1' (H.264) or 'hev1' (H.265)
    resolution: { width: 1280, height: 720 },
    onStatus: (status) => {
        console.log('Status:', status);
    },
    onLog: (msg, type) => {
        console.log(`[${type}] ${msg}`);
    },
    onStats: (stats) => {
        console.log(`Stats - Bytes: ${stats.bytes}, Frames: ${stats.frames}, GOPs: ${stats.gops}, Audio: ${stats.audio}`);
    }
});

// Start capturing and publishing
await publisher.start();

// Stop publishing
// publisher.stop();

API Reference

1. ErmisWT (Session Management)

| Method | Parameters | Returns | Description | | :--- | :--- | :--- | :--- | | createLiveStreamSession | streamName: string | Promise<string> | Creates a session and returns the stream_id. | | activeStream | streamId: string | Promise<ErmisWtStream> | Activates the stream and returns connection details. | | getListStream | - | Promise<ErmisWtStream[]> | Fetches the list of all streams for the current token. | | deactivateStream | streamId: string | Promise<void> | Stops the stream session on the server. | | setToken | token: string | void | Updates the authorization token. |

ErmisWtStream object:

  • stream_id: (string) The unique ID of the stream.
  • stream_name: (string) The name of the stream.
  • stream_url: (string) The WebTransport URL for publishing.
  • link: (string) The HLS URL for the video player.

2. WtPublisher (Media Streaming)

| Method | Parameters | Returns | Description | | :--- | :--- | :--- | :--- | | start | - | Promise<void> | Starts media capture (camera/mic) and connects to WebTransport. | | stop | - | void | Stops publishing and releases all media tracks and connections. | | getMediaStream | - | MediaStream | Returns the local MediaStream object for preview. |


Important Notes:

  • The browser must support both WebTransport and WebCodecs.
  • WebTransport requires a secure context (HTTPS), except for localhost.
  • Call getMediaStream() after start() has resolved.