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

tanstack

v2.0.3

Published

TanStack Player — A developer-first, universal Video Player SDK built on Video.js with headless hooks, plugin architecture, and React-first DX

Readme

30tools.comAll Your Tools. One Platform. 194+ free, privacy-first online tools for Image, PDF, Video, Developer, SEO & more. Fast, beautiful, and no uploads required.

▶ TanStack Player

A developer-first, universal Video Player SDK built on Video.js

Headless hooks · Plugin architecture · React-first DX · Streaming ready

npm version npm downloads npm bundle size license Visitors

TypeScript Video.js GitHub stars GitHub issues GitHub pull requests

Documentation · npm · Examples · Contributing


✨ Why TanStack Player?

Building video experiences is hard — buffering, streaming formats, browser quirks, accessibility, and state management all add complexity. TanStack Player abstracts all of this behind a clean, modern SDK:

| Feature | Description | |---------|-------------| | 🎬 Headless Core | Framework-agnostic engine with play/pause/seek/volume/speed | | 🪝 React Hooks | useTanStackPlayer(), useProgress(), useBookmarks() | | 🔌 Plugin System | Lifecycle-aware plugins with event bus access | | 📡 Streaming | HLS, DASH, adaptive bitrate via Video.js | | ⚡ Tiny | ~21KB total SDK (ESM, gzipped much smaller) | | 🎯 TypeScript | Full typed API with JSDoc |


📦 Installation

npm install tanstack video.js

Note: video.js is a peer dependency. Load it via CDN or bundle it.


🚀 Quick Start

import { TanStackPlayer } from 'tanstack'

export default function App() {
  return (
    <TanStackPlayer
      src="https://example.com/video.mp4"
      controls
      autoPlay={false}
    />
  )
}

🪝 Hooks API

Build completely custom UI with headless hooks:

import { useTanStackPlayer, useProgress } from 'tanstack'

function Controls() {
  const { play, pause, isPlaying, seek, setVolume } = useTanStackPlayer()
  const { progress, buffered, currentTime, duration } = useProgress()

  return (
    <div>
      <button onClick={() => isPlaying ? pause() : play()}>
        {isPlaying ? '⏸' : '▶'}
      </button>
      <div>Progress: {progress.toFixed(1)}%</div>
    </div>
  )
}

🔌 Plugin System

Extend player capabilities with plugins:

import { TanStackPlayer, createBookmarkPlugin } from 'tanstack'

const bookmarks = createBookmarkPlugin()

function App() {
  return (
    <TanStackPlayer
      src="/video.mp4"
      plugins={[bookmarks]}
    >
      <BookmarkControls />
    </TanStackPlayer>
  )
}

Using Bookmark Hooks

import { useBookmarks } from 'tanstack'

function BookmarkControls() {
  const { bookmarks, addBookmark, seekToBookmark } = useBookmarks()

  return (
    <div>
      <button onClick={() => addBookmark('Important moment')}>
        🔖 Bookmark
      </button>
      {bookmarks.map(bm => (
        <button key={bm.id} onClick={() => seekToBookmark(bm.id)}>
          {bm.label} ({bm.time}s)
        </button>
      ))}
    </div>
  )
}

📦 Packages

| Package | Size | Description | |---------|------|-------------| | tanstack | — | All-in-one package (re-exports everything) | | @tanstack-player/core | 8.7KB | Headless event bus, state store, controller, plugin runtime | | @tanstack-player/adapter-videojs | 4.6KB | Video.js engine adapter | | @tanstack-player/react | 6.2KB | React component + hooks | | @tanstack-player/plugin-bookmark | 1.6KB | Bookmark plugin |


🏗 Architecture

TanStack Player
 ├─ Core (headless)
 │   ├── EventBus        — typed event emitter
 │   ├── StateStore      — reactive state management
 │   ├── PlayerController — unified playback API
 │   └── PluginRuntime   — plugin lifecycle manager
 │
 ├─ Adapters
 │   └── VideoJsAdapter  — Video.js ↔ Core bridge
 │
 ├─ React
 │   ├── <TanStackPlayer /> — component
 │   ├── useTanStackPlayer  — control hook
 │   ├── useProgress        — progress hook
 │   └── useBookmarks       — bookmark plugin hook
 │
 └─ Plugins
     └── BookmarkPlugin  — timestamp bookmarks

⚙️ Video.js Options

Pass native Video.js configuration through:

<TanStackPlayer
  src="/video.mp4"
  videojsOptions={{
    fluid: true,
    preload: 'auto',
    playbackRates: [0.5, 1, 1.5, 2],
  }}
/>

🎯 Events

Unified event system across all adapters:

<TanStackPlayer
  src="/video.mp4"
  onReady={() => console.log('Ready!')}
  onPlay={() => console.log('Playing')}
  onPause={() => console.log('Paused')}
  onEnded={() => console.log('Ended')}
  onTimeUpdate={(time, duration) => console.log(`${time}/${duration}`)}
  onError={(err) => console.error(err)}
/>

🛠 Development

git clone https://github.com/sh20raj/tanstack
cd tanstack
npm install
npm run build
npm run dev

See CONTRIBUTING.md for detailed guidelines.


🛣 Roadmap

  • [ ] HLS.js adapter
  • [ ] Plyr lightweight adapter
  • [ ] Analytics plugin
  • [ ] Floating mini-player plugin
  • [ ] Subtitle editor plugin
  • [ ] AI chapter detection plugin
  • [ ] React Native support

🧰 Recommended Tools

Looking for developer utilities to use alongside TanStack Player? Check out 30tools.com — a suite of 194+ free, privacy-first online tools for developers:

  • JSON Formatter & Diff Viewer — perfect for debugging API responses
  • Image Compressor & Converter — optimize video thumbnails and posters
  • JWT Decoder — inspect auth tokens for protected video content
  • CSS Gradient Generator — create beautiful player UI gradients
  • Base64 ↔ Image — handle inline poster images

All tools run directly in your browser for maximum privacy. No uploads, no tracking.

👉 30tools.com — One platform, every tool you need.


📄 License

MIT — Made with ❤️ by @sh20raj


⭐ Star on GitHub — it helps a lot!