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

atozas-react-video-player

v1.0.1

Published

A customizable React video player with playlist and control features.

Readme

Enhanced React Video Player

A modern, feature-rich video player component built with React and TypeScript. This enhanced version includes professional UI, keyboard shortcuts, multiple themes, and comprehensive error handling.

✨ Features

🎮 Interactive Controls

  • Play/Pause with spacebar or click
  • Seek with arrow keys (10 seconds) or progress bar
  • Volume control with arrow keys or hover slider
  • Mute/Unmute with 'M' key or button
  • Fullscreen toggle with 'F' key or button
  • Playback rate selection (0.5x to 2x)

🎨 Modern UI/UX

  • Hover controls that appear/disappear smoothly
  • Dark and light themes with automatic styling
  • Responsive design that works on all screen sizes
  • Smooth animations and transitions
  • Professional styling with gradients and shadows

🎯 Enhanced Functionality

  • Multiple video support with playlist navigation
  • Auto-play and loop options
  • Buffering indicator with spinner animation
  • Error handling with retry functionality
  • Keyboard shortcuts for power users
  • Accessibility features with focus indicators

🔧 Developer Experience

  • TypeScript support with full type definitions
  • Customizable props for different use cases
  • Clean, modular code with React hooks
  • Performance optimized with useCallback and proper event handling

🚀 Quick Start

npm install react-video-player
import VideoPlayer from "react-video-player";

const MyComponent = () => {
  const videos = [
    {
      src: "https://example.com/video.mp4",
      label: "My Video",
      thumbnail: "https://example.com/thumbnail.jpg",
    },
  ];

  return (
    <VideoPlayer
      sources={videos}
      width="100%"
      height="400px"
      autoPlay={false}
      loop={false}
      theme="dark"
    />
  );
};

📋 Props

| Prop | Type | Default | Description | | -------------- | ------------------- | -------- | ---------------------- | | sources | VideoSource[] | Required | Array of video sources | | width | number \| string | '100%' | Player width | | height | number \| string | 'auto' | Player height | | autoPlay | boolean | false | Auto-play videos | | loop | boolean | false | Loop current video | | showControls | boolean | true | Show control overlay | | theme | 'light' \| 'dark' | 'dark' | UI theme |

VideoSource Interface

interface VideoSource {
  src: string; // Video URL
  label?: string; // Display name
  thumbnail?: string; // Thumbnail image
  quality?: string; // Quality label (future use)
}

⌨️ Keyboard Shortcuts

| Key | Action | | ------- | -------------------------------- | | Space | Play/Pause | | ← → | Seek 10 seconds backward/forward | | ↑ ↓ | Volume up/down | | M | Mute/Unmute | | F | Toggle Fullscreen |

🎨 Themes

The player supports two themes:

  • Dark Theme (default): Professional dark interface
  • Light Theme: Clean light interface for bright environments
<VideoPlayer theme="light" sources={videos} />

🔧 Advanced Usage

Multiple Videos with Playlist

const playlist = [
  {
    src: "video1.mp4",
    label: "Introduction",
    thumbnail: "thumb1.jpg",
  },
  {
    src: "video2.mp4",
    label: "Tutorial",
    thumbnail: "thumb2.jpg",
  },
];

<VideoPlayer sources={playlist} />;

Auto-play with Loop

<VideoPlayer sources={videos} autoPlay={true} loop={true} />

Custom Dimensions

<VideoPlayer sources={videos} width={800} height={450} />

🎯 Demo

Check out the interactive demo to see all features in action:

import { VideoPlayerDemo } from "react-video-player";

<VideoPlayerDemo />;

🔄 Migration from Basic Version

If you're upgrading from the basic video player:

  1. Add CSS import: The new version requires the CSS file
  2. Update props: New props like theme, autoPlay, loop are available
  3. Enhanced interface: The VideoSource interface now supports quality field
  4. Better error handling: Errors are now displayed with retry options

🛠️ Development

# Install dependencies
npm install

# Run demo
npm start

# Build
npm run build

📝 Changelog

v2.0.0 - Enhanced Version

  • ✨ Modern UI with hover controls
  • ⌨️ Keyboard shortcuts
  • 🎨 Dark/light themes
  • 🔄 Auto-play and loop options
  • 📱 Responsive design
  • ⚡ Performance optimizations
  • 🎯 Better error handling
  • ♿ Accessibility improvements

v1.0.0 - Basic Version

  • Basic video controls
  • Simple UI
  • Core functionality

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments