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

movie-thumbnail

v1.3.0

Published

A React component that renders a strip of seek thumbnails for video players, loading frames from a CDN based on TMDB ID and timestamp.

Readme

movie-thumbnail

A React component that renders a strip of seek thumbnails for video players, loading frames from a CDN based on TMDB ID and timestamp.

Installation

npm install movie-thumbnail

Usage

import ThumbnailStrip from 'movie-thumbnail'

function Player() {
  return (
    <ThumbnailStrip
      tmdbId={550}
      time={120}
      round={10}
      duration={7200}
      imageCount={5}
      currentPosition={2}
      imageWidth={160}
      imageHeight={90}
      imageSpacing={8}
      unit="px"
      slide={false}
      slideBuffer={4}
      slideDuration={0.3}
      onSuccess={(tmdbId) => console.log('loaded', tmdbId)}
      onError={(tmdbId) => console.error('error', tmdbId)}
      apiHost="https://api.domain.com"
      apiKey="your_api_key_here"
      className="strip"
      thumbClassName="thumb"
      imgClassName="thumb-img"
      placeholderClassName="thumb-placeholder"
    />
  )
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | tmdbId | number | — | TMDB movie ID | | time | number | — | Current playback time in seconds | | round | number | — | Rounding interval for thumbnail timestamps | | duration | number | — | Total video duration in seconds | | imageCount | number | 5 | Number of thumbnails to display | | currentPosition | number | 2 | Index of the "current" thumbnail in the strip | | imageWidth | number | 160 | Width of each thumbnail | | imageHeight | number | 90 | Height of each thumbnail | | imageSpacing | number | 8 | Gap between thumbnails | | unit | string | 'px' | CSS unit for dimensions (px, rem, etc.) | | slide | boolean | false | Enable sliding animation for thumbnail transitions | | slideBuffer | number | 4 | Extra offscreen thumbnails rendered on each side when sliding | | slideDuration | number | 0.3 | Slide transition duration in seconds | | onSuccess | function | — | Callback fired once per tmdbId when the probe image loads | | onError | function | — | Callback fired once per tmdbId when the probe image fails to load | | apiHost | string | — | API host used to sign asset URLs | | apiKey | string | — | API key sent in the X-API-Key request header | | className | string | — | Class for the strip container | | thumbClassName | string | — | Class for each thumbnail wrapper | | imgClassName | string | — | Class for loaded <img> elements | | placeholderClassName | string | — | Class for placeholder elements |

How It Works

The component requests a signed asset URL from {apiHost}/assets/sign?path={tmdbId} with the X-API-Key header. Thumbnails are then fetched from {signedUrl}/{seconds}.jpg where seconds is zero-padded to 5 digits and rounded to the nearest round interval. Signed URLs are cached when possible, the probe image controls onSuccess and onError, images are preloaded via new Image(), and a placeholder is shown until each image loads.

License

MIT