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

react-max-player

v1.1.0

Published

Professional customizable video player for React

Readme

react-max-player

A custom video player component for React applications. It supports multi-quality switching, video chapters, custom subtitles, and is fully themable.

Features

  • Custom video controls and UI
  • Quality switching (e.g., 4K, 1080p, 720p)
  • Video chapters and timeline markers
  • Keyboard shortcuts support
  • Picture-in-Picture and Fullscreen controls
  • Written in TypeScript

Installation

npm install react-max-player

(You can also use yarn or pnpm)

Usage

Styles are injected automatically, so you just need to import the component.

import { VideoPlayer } from "react-max-player";

function App() {
  return (
    <VideoPlayer
      src="https://example.com/video.mp4"
      title="My Custom Video"
    />
  );
}

Advanced: Qualities & Chapters

If you have multiple resolutions or want to split the video into chapters:

import { VideoPlayer, Chapter, VideoQuality } from "react-max-player";

const qualities: VideoQuality[] = [
  { label: "1080p", value: "1080", src: "video_1080.mp4" },
  { label: "720p", value: "720", src: "video_720.mp4" },
];

const chapters: Chapter[] = [
  { title: "Intro", startTime: 0, endTime: 45 },
  { title: "Main Part", startTime: 46, endTime: 120 },
];

function App() {
  return (
    <VideoPlayer
      src={qualities[0].src}
      qualities={qualities}
      chapters={chapters}
      title="Advanced Sample"
      enableKeyboardShortcuts={true}
    />
  );
}

Theming and Customization

You can customize almost every part of the player using the controlOptions prop:

<VideoPlayer
  theme="dark"
  controlOptions={{
    seekBarStyle: {
      playedColor: "#3b82f6",
      bufferedColor: "rgba(255, 255, 255, 0.2)",
    },
    showPictureInPictureButton: false
  }}
/>

Controls visibility behavior

By default, control panel stays visible in normal mode (better for zoomed or compact layouts).
If you want fullscreen auto-hide behavior, enable it explicitly:

<VideoPlayer
  src="https://example.com/video.mp4"
  autoHideControls={true}
/>

Local Development

If you want to contribute or test the playground locally:

git clone https://github.com/AsadbekAbdullayev/react-max-player.git
cd react-max-player/demo
npm install
npm run dev

Migration

Upgrading from pre-1.1 releases

  • Control panel behavior changed: controls stay visible in normal mode by default.
  • To enable fullscreen auto-hide, pass autoHideControls={true}.
  • If you previously relied on implicit auto-hide everywhere, set this prop explicitly in your wrapper component.

FAQ

Why does playback not start after switching demo cases?

Recent versions fix stale play state issues by using the actual media element state (paused/ended) in togglePlay.

Do I need to import CSS manually?

No. Styles are injected automatically in the package build.

Which React versions are supported?

react-max-player supports React 18 and 19. CI includes a compatibility matrix for both versions.

Troubleshooting

Controls are not visible in local demo

  • Run demo with forced cache refresh: npm --prefix demo run dev -- --force
  • Hard refresh browser (Ctrl+F5)
  • Ensure the opened port matches the active Vite terminal output.

npm publish fails on prepublish checks

  • Run npm run release:verify
  • Make sure CHANGELOG.md contains a header matching package.json version (for example: ## [1.1.0])
  • Verify package contents with npm run pack:check

License

MIT