Socket
Book a DemoInstallSign in
Socket

@chrisabdo/video

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chrisabdo/video

A lightweight and customizable React video player component

0.3.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

@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:

  • Clone the repository
  • Install dependencies:
    bun install
    
  • Make your changes
  • Build the project:
    bun run build
    
  • Test your changes
  • 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.

Keywords

react

FAQs

Package last updated on 28 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.