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

@badalcodeorg/react-awesome-player

v0.2.3

Published

A modern, feature-rich, and accessible video player for React.

Readme

React Awesome Player

npm version License: MIT

A modern, feature-rich, and accessible video player for React, built with hls.js and Tailwind CSS. Designed to be simple to use and easy to integrate into any project.

Features

  • HLS & MP4 Support: Plays modern streaming formats (HLS) with a fallback to standard MP4.
  • Double-Tap/Click to Seek: Intuitively seek 10 seconds forward or backward.
  • Playlist Functionality: Easily create and manage video playlists.
  • Adaptive Bitrate Streaming: Automatically adjusts video quality based on network conditions.
  • Rich Controls: Includes play/pause, volume, fullscreen, picture-in-picture, and settings menu.
  • Theatre Mode: A beautiful, immersive viewing experience.
  • Keyboard Shortcuts: Full keyboard navigation for power users.
  • Customizable: Built with Tailwind CSS for easy theme customization.
  • Accessible: Designed with accessibility in mind.
  • Timeline Markers: Display chapters or key moments directly on the timeline.

Installation

pnpm add react-awesome-player

Usage

Here's how to get started with a single video:

import { VideoPlayer } from 'react-awesome-player';
import 'react-awesome-player/dist/style.css';

function MyPage() {
  const videoSrc = 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8';
  const posterSrc =
    'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS46SAdbg4xit4rTe4qzi7h7YErU441bJMk4A&s';
  const subtitles = [
    {
      lang: 'en',
      label: 'English',
      src: 'path/to/your/subtitles.vtt',
    },
  ];

  return (
    <div className="main-content-for-theater">
      <VideoPlayer
        src={videoSrc}
        title="My Awesome Video"
        subtitles={subtitles}
        theaterModeEnabled={true}
        poster={posterSrc}
      />
    </div>
  );
}

Playlist Usage

import { VideoPlayer } from 'react-awesome-player';
import 'react-awesome-player/dist/style.css';
import { useState } from 'react';

function PlaylistPage() {
  const myPlaylist = [
    'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
    'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8',
  ];

  const [currentIndex, setCurrentIndex] = useState(0);

  return (
    <div className="main-content-for-theater">
      <VideoPlayer
        playlist={myPlaylist}
        currentVideoIndex={currentIndex}
        onVideoChange={setCurrentIndex}
        title={`Video ${currentIndex + 1} of ${myPlaylist.length}`}
        theaterModeEnabled={true}
      />
    </div>
  );
}

Theatre Mode Setup

For Theatre Mode to work correctly, you need to add a small piece of CSS to your global stylesheet. The player adds a class to the tag, and this CSS tells your main content how to react.

In your global styles.css:

body.theater-mode-active .main-content-for-theater {
  transition: margin-top 0.3s ease-in-out;
  margin-top: 56.25vw; /* Pushes content down by the height of a 16:9 video */
}

API / Props

| Prop | Type | Required | Description | | -------------------- | --------------------------------------- | -------- | ------------------------------------------------------------------------------------------ | | src | string | Yes* | The URL of the single video source to play. | | poster | string | No* | An optional URL for a poster image to display before the video starts. | | playlist | string[] | Yes* | An array of video source URLs for a playlist. | | currentVideoIndex | number | Yes** | The starting index for the playlist. | | onVideoChange | (newIndex: number) => void | Yes** | Callback triggered when the video changes in a playlist. | | title | string | No | An optional title displayed at the top-left of the player. | | subtitles | Array | No | An array of subtitle track objects ({ lang, label, src }). | | theaterModeEnabled | boolean | No | If true, enables the theatre mode feature. Requires global CSS setup. Defaults to false. | | chapters | Array<{time: number; label: string;}> | No | An array of chapter markers to display on the timeline. |

*You must provide either src or playlist, but not both. **Required only when using the playlist prop.