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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@eliteencoder/byoc-sdk

v1.0.4

Published

Production-quality SDK for Livepeer BYOC video streaming with AI processing

Readme

BYOC Stream SDK

Production-quality SDK for Livepeer BYOC video streaming with AI-powered insights.

Highlights

  • 🎥 WebRTC streaming with WHIP/WHEP endpoints and automatic ICE handling
  • 🤖 AI-ready pipelines with custom params/state updates
  • 📊 SSE data streaming for stats and text insights
  • 📱 Media device management with permissions and device lists
  • ⚛️ React hooks for publisher, viewer, data, and event flows
  • 📦 TypeScript-first exports with ESM/CJS builds
  • 🔄 Robust retries plus connection monitoring and stats

Quick Start

git clone https://github.com/eliteprox/byoc-sdk.git
cd byoc-sdk
npm install
npm run build    # produces `dist/` for publishing or linking
npm run serve:examples    # opens `examples/html-demo.html` on http://localhost:3005

The serve:examples script spins up http-server against the repo root and immediately serves examples/html-demo.html. Open http://localhost:3005 to try the new single-page demo and inspect the console log to see SDK events and stats.

Example Preview

  • examples/html-demo.html is the only bundled example. It wires the SDK to the browser camera, logs events, and renders stats + config controls.
  • Adjust the prompts input or the StreamPublisher start options inside that file to exercise different AI pipelines or resolutions.
  • Use the StreamPublisher, StreamViewer, and DataStreamClient snippets below as the foundation for your own pages.

Integrating the SDK

import { StreamPublisher, StreamConfig } from '@eliteencoder/byoc-sdk'

const config: StreamConfig = {
  whipUrl: 'https://your-server/gateway/ai/stream/start',
  whepUrl: 'https://your-server/mediamtx',
  dataStreamUrl: 'https://your-server/gateway',
  kafkaEventsUrl: 'https://your-server/kafka/events',
  defaultPipeline: 'comfystream'
}

const publisher = new StreamPublisher(config)

await publisher.start({
  streamName: 'my-stream',
  pipeline: 'comfystream',
  width: 1280,
  height: 720,
  fpsLimit: 30,
  enableVideoIngress: true,
  enableAudioIngress: true,
  enableDataOutput: true,
  customParams: { prompts: 'Analyze this frame' }
})

await publisher.updateStream({
  params: { prompts: '{"1":{"inputs":{"images":["3",0]},"class_type":"SaveTensor"}}' },
  // Width/height changes require restarting the stream, so omit them here.
})

Hook up a StreamViewer to the same StreamConfig to render the WHEP output, or create a DataStreamClient for SSE payloads to mirror real-time insights from the demo.

Commands

  • npm run build – emit dist/ for publishing or linking
  • npm run serve:examples – serve examples/html-demo.html on port 3005
  • npm test – run the Vitest suite
  • npm run demo:dev – start the React demo webapp in demo/

Linking locally

Use npm link if you need to consume the SDK from another project without publishing:

cd byoc-sdk
npm link
cd ../livepeer-app-pipelines/byoc-stream/webapp
npm link @eliteencoder/byoc-sdk
npm install
npm run dev

Support

  • File issues at https://github.com/eliteprox/byoc-sdk/issues
  • Review the bundled demo directory for a full React + Vite example that mirrors production usage, including its own README.
  • Contributions welcome – send PRs to the repository and reference this README for context.

License

MIT