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

@booyaka101/fudog-js

v1.0.0

Published

React NDI preview component for MJPEG streams on Linux.

Readme

@booyaka101/fudog-js

React components for previewing NDI sources via MJPEG streams on Linux.

Installation

npm install @booyaka101/fudog-js
# or
yarn add @booyaka101/fudog-js

Usage

import NDIPreview, { MJPEG } from '@booyaka101/fudog-js'

function Example() {
  return (
    <NDIPreview
      sourceName="NDI Source Name"
      sessionId="unique-session-id"
      baseUrl="http://localhost:3000" // your backend providing /preview
      maxHeight={300}
      showLabel
    />
  )
}

NDIPreview internally uses the MJPEG component to render a live MJPEG stream from:

${baseUrl}/preview?stream=${encodeURIComponent(sourceName)}&session=${encodeURIComponent(sessionId)}

Peer dependencies

This package expects the following to be present in your app:

  • react
  • react-dom
  • @mui/material
  • @emotion/react
  • @emotion/styled

Development

  • Build: npm run build
  • Watch build: npm run dev
  • The package is built with tsup and outputs both CJS (dist/index.cjs) and ESM (dist/index.js).

API

NDIPreview

  • sourceName – NDI source name to preview (required for preview)
  • sessionId – unique session identifier
  • baseUrl – base URL of your backend (e.g. http://localhost:3000)
  • maxHeight – maximum height in pixels (default: 300)
  • showLabel – whether to show the source name label (default: true)
  • containerSx – MUI sx for the outer Paper
  • paperProps – props forwarded to the outer Paper
  • previewBoxProps – props forwarded to the inner preview Box
  • mjpegProps – additional props forwarded to the underlying MJPEG component

MJPEG

  • url – MJPEG stream URL
  • containerSx – MUI sx for the outer container
  • frameSx – MUI sx for the frame wrapper
  • onResolution(width, height) – called when the stream resolution is known
  • maxRetries – maximum number of retry attempts (default: 3)
  • retryDelay – delay between retries in ms (default: 1000)
  • connectTimeout – timeout before considering the initial connection as failed (default: 1500ms)
  • onLoad() – called when the stream has loaded
  • onError(error) – called when an error occurs
  • onLoadingChange(loading) – called whenever loading state changes
  • debug – enables verbose console logging when true

Publishing

  1. Log in to npm: npm login

  2. Build: npm run build

  3. (Optional) Test the tarball: npm pack

  4. Publish as public scoped package:

    npm publish --access public