0.3.0 • Published 11 months ago

@chrisabdo/video v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@chrisabdo/video

A lightweight and customizable React video player component.

Demo Video

Installation

npm install @chrisabdo/video

Usage

import { Video } from "@chrisabdo/video";

function App() {
  return (
    <Video
      src="path/to/your/video.mp4"
      progressColor="#3B82F6"
      controlsColor="#FFFFFF"
      textColor="#FFFFFF"
      controlsBackgroundColor="rgba(0, 0, 0, 0.5)"
    />
  );
}

Props

The Video component accepts all standard HTML video attributes in addition to the following custom props:

PropTypeDefaultDescription
srcstring-The source URL of the video (required)
progressColorstring"#3B82F6"Color of the progress bar
controlsColorstring"#FFFFFF"Color of the control icons
textColorstring"#FFFFFF"Color of the text (time display)
controlsBackgroundColorstring"rgba(0, 0, 0, 0.5)"Background color of the controls bar
hideControlsbooleanfalseIf true, hides the control bar
classNamestring-Additional CSS class for the video container

Features

  • Play/Pause toggle
  • Progress bar with seek functionality
  • Time display (current time / total duration)
  • Volume control
  • Fullscreen toggle
  • Customizable colors
  • Responsive design

Types

interface VideoProps extends React.VideoHTMLAttributes<HTMLVideoElement> {
  progressColor?: string;
  controlsColor?: string;
  textColor?: string;
  hideControls?: boolean;
  controlsBackgroundColor?: string;
}

Development

To contribute to this project:

  1. Clone the repository
  2. Install dependencies:
    bun install
  3. Make your changes
  4. Build the project:
    bun run build
  5. Test your changes
  6. Submit a pull request

Author

Christopher Abdo

Issues and Feedback

If you encounter any issues or have feedback, please file an issue on the GitHub repository.

0.3.0

11 months ago

0.2.9

11 months ago

0.2.8

11 months ago

0.2.7

11 months ago

0.2.6

11 months ago

0.2.5

11 months ago

0.2.4

11 months ago

0.2.3

11 months ago

0.2.2

11 months ago

0.2.1

11 months ago

0.2.0

11 months ago

0.1.9

11 months ago

0.1.8

11 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.5

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago