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

@genie-player/react

v0.1.1

Published

React components and hooks for customer-hosted video with Genie Player captions

Downloads

46

Readme

@genie-player/react

Add multilingual captions to video you host with Genie Player's React components and read-only browser hooks.

Install

npm install @genie-player/react

Quick start

  1. Open Genie Player, upload your video, review the generated captions, and complete the review.
  2. From Processing → Links, copy the completed job ID.
  3. From Dashboard → API keys, create a publishable React client key and allow the exact origin where your player runs.
  4. Host the matching video on your own CDN or video platform, then pass its URL and the completed job ID to GeniePlayer.
import { GeniePlayer, GenieProvider } from "@genie-player/react";
import "@genie-player/react/styles.css";

<GenieProvider
  clientKey={import.meta.env.VITE_GENIE_PLAYER_CLIENT_KEY}
  theme={{
    colors: {
      accent: "#7c3aed",
      surface: "#111827",
      text: "#f9fafb",
      muted: "#94a3b8",
      playerBackground: "#020617",
    },
    radius: "18px",
    fontFamily: "Inter, sans-serif",
  }}
>
  <GeniePlayer
    jobId="translation-job-id"
    src="https://customer-cdn.example/video.mp4"
  />
</GenieProvider>

jobId identifies captions that have completed dashboard review. src is the matching video URL that you host; a WebVTT URL or media ID cannot replace the job ID.

The provider merges partial theme objects with defaultGenieTheme and applies the resolved values to every prebuilt component. Use useGenieTheme() to read the same resolved theme in custom interfaces.

Create the publishable client key in Dashboard → API keys and configure exact allowed origins, including protocol and development port. The SDK exchanges the key and reviewed job ID for a ten-minute, read-only token bound to that job and origin. It caches the token, refreshes it when needed, and authorizes the hosted WebVTT tracks used by native <track> elements.

The SDK retains an argument-free getClientToken callback for the future trusted-backend flow, but server API key creation is not available at the initial public beta. Launch integrations should use clientKey. Never place a server credential in browser code; clientKey and getClientToken are mutually exclusive.

Pass your own video URL to GeniePlayer; Genie temporarily retains the uploaded source for processing and review, deletes it when review is completed, and hosts the approved WebVTT tracks.

GeniePlayer sets the native video element to crossOrigin="anonymous" by default so browsers can load Genie-hosted WebVTT tracks from a separate origin. Configure your video CDN to return an Access-Control-Allow-Origin header that permits your player origin (or * for public media). Override crossOrigin only when your video host and caption delivery are configured for the same alternative CORS mode.

The package defaults to https://api.genieplayer.com.