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

@lumra/react

v0.1.6

Published

React bindings for Lumra player

Downloads

59

Readme

@lumra/react

React component and hooks for the Lumra media player. Wraps @lumra/core with a full-featured <LumraPlayer> component including paywall overlay, subtitle tracks, chapter markers, and ad support.

Install

npm install @lumra/react @lumra/core

Basic usage

import { LumraPlayer } from '@lumra/react'

export function VideoPage() {
  return (
    <LumraPlayer
      src="https://example.com/stream.m3u8"
      poster="https://example.com/thumb.jpg"
      style={{ width: '100%', aspectRatio: '16/9' }}
      onPlay={() => console.log('play')}
      onEnded={() => console.log('ended')}
    />
  )
}

With paywall

import { LumraPlayer } from '@lumra/react'
import { useLumraPaywall } from '@lumra/sdk'   // optional SDK hook

export function VideoPage({ videoId, src }) {
  const { locked, unlock } = useLumraPaywall(videoId)

  return (
    <LumraPlayer
      src={src}
      paywall={{
        locked,
        title: 'Unlock this video',
        subtitle: 'One-time purchase',
        options: [
          { id: 'buy',  label: 'Buy',  badge: '$9.99', description: 'Own forever',    onSelect: () => unlock('buy') },
          { id: 'rent', label: 'Rent', badge: '$2.99', description: '48-hour stream', onSelect: () => unlock('rent') },
        ],
        onUnlock: () => unlock(),
      }}
      style={{ width: '100%', aspectRatio: '16/9' }}
    />
  )
}

With chapters

<LumraPlayer
  src="https://example.com/stream.m3u8"
  chapters={[
    { at: 0,   title: 'Intro' },
    { at: 30,  title: 'Act 1' },
    { at: 120, title: 'Climax' },
  ]}
  style={{ width: '100%', aspectRatio: '16/9' }}
/>

With subtitle tracks

<LumraPlayer
  src="https://example.com/stream.m3u8"
  tracks={[
    { src: '/captions/en.vtt', kind: 'captions', srcLang: 'en', label: 'English', default: true },
    { src: '/captions/es.vtt', kind: 'captions', srcLang: 'es', label: 'Spanish' },
  ]}
  style={{ width: '100%', aspectRatio: '16/9' }}
/>

With media info overlay

<LumraPlayer
  src="https://example.com/stream.m3u8"
  mediaInfo={{
    title: 'Episode 1',
    creator: { name: 'Studio Name', avatarUrl: '/avatars/studio.jpg' },
  }}
  style={{ width: '100%', aspectRatio: '16/9' }}
/>

Global config (optional)

Wrap your app with LumraConfigProvider to set theme, controls, and ad config once:

import { LumraConfigProvider, defineLumraConfig } from '@lumra/react'

const config = defineLumraConfig({
  theme: {
    accentColor: '#a89ef9',
    borderRadius: '12px',
  },
  controls: {
    pip: true,
    fullscreen: true,
    autoHide: true,
    autoHideDelay: 3000,
  },
  paywall: {
    previewDuration: 10,   // seconds of free preview
  },
})

export function App() {
  return (
    <LumraConfigProvider config={config}>
      <YourApp />
    </LumraConfigProvider>
  )
}

Props reference

| Prop | Type | Description | |---|---|---| | src | string | Video URL — MP4, HLS (.m3u8), WebM | | poster | string | Thumbnail image shown before playback | | autoplay | boolean | Autoplay on load (browser may require muted) | | muted | boolean | Start muted | | loop | boolean | Loop playback | | mediaInfo | { title?, creator? } | Overlay title and creator info | | tracks | LumraTrack[] | WebVTT subtitle / caption tracks | | chapters | { at: number; title: string }[] | Chapter markers on the seek bar | | heatmapData | number[] | View-count array for heatmap bar (requires license) | | paywall | LumraPlayerPaywall | Lock overlay with buy/rent options | | plugins | Plugin[] | Additional plugins to attach | | onPlay | () => void | Play event callback | | onPause | () => void | Pause event callback | | onEnded | () => void | Ended event callback | | onTimeUpdate | (t, dur) => void | Time update callback | | onError | (code, msg) => void | Error callback |


© 2026 Reel Foundry AU. All rights reserved.
MIT License — see LICENSE