reactvidplay
Advanced tools
+1
-1
| { | ||
| "name": "reactvidplay", | ||
| "version": "1.2.0", | ||
| "version": "1.2.1", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "description": "A good looking customizable React video player component", |
+47
-87
@@ -1,33 +0,23 @@ | ||
| Hereβs a polished **README.md** tailored for your `react-videoplayer` package. Iβve written it the way an experienced open-source maintainer would structure itβclear, professional, and developer-friendly: | ||
| ````markdown | ||
| # React Vid Player | ||
| --- | ||
| A customizable React video player component with advanced controls, keyboard shortcuts, and modern UI. | ||
| # React Video Player | ||
| <p align="center"> | ||
| <img src="/assets/player.png" alt="React Vid Player Preview" width="800" /> | ||
| </p> | ||
| A customizable React video player component with **modern UI**, **keyboard shortcuts**, and **advanced controls**. Built for developers who want a lightweight yet feature-rich alternative to default HTML video controls. | ||
| ## Installation | ||
|  <!-- Replace with an actual screenshot/gif later --> | ||
| --- | ||
| ## π Installation | ||
| ```bash | ||
| npm install react-videoplayer lucide-react | ||
| npm install reactvidplay | ||
| ``` | ||
| ```` | ||
| or with yarn: | ||
| ## Usage | ||
| ```bash | ||
| yarn add react-videoplayer lucide-react | ||
| ``` | ||
| --- | ||
| ## β‘ Usage | ||
| ```tsx | ||
| import React from "react"; | ||
| import { ReactVidPlayer } from "react-videoplayer"; | ||
| import "react-videoplayer/dist/ReactVidPlayer.css"; | ||
| import { ReactVidPlayer } from "reactvidplay"; | ||
| import "reactvidplay/dist/ReactVidPlayer.css"; // Import CSS | ||
@@ -41,6 +31,3 @@ function App() { | ||
| height="450px" | ||
| controls | ||
| color="#ff0000" | ||
| onPlay={() => console.log("Video started")} | ||
| onPause={() => console.log("Video paused")} | ||
| /> | ||
@@ -54,71 +41,44 @@ </div> | ||
| --- | ||
| ## Features | ||
| ## β¨ Features | ||
| - β¨ Custom video controls with modern design | ||
| - β¨οΈ Keyboard shortcuts (Space, Arrow keys) | ||
| - π Volume control with slider | ||
| - π± Picture-in-picture support | ||
| - π₯οΈ Fullscreen support | ||
| - π¨ Customizable theme color | ||
| - π± Mobile responsive | ||
| * ποΈ **Custom video controls** with a clean, modern UI | ||
| * β¨οΈ **Keyboard shortcuts** for quick navigation | ||
| * π **Volume control & mute toggle** with slider | ||
| * π₯ **Picture-in-Picture** support | ||
| * π₯οΈ **Fullscreen mode** with smooth transition | ||
| * π¨ **Customizable theme color** via props | ||
| * π± **Mobile responsive & touch-friendly** | ||
| * π±οΈ **Optional context menu** (disable right-click download menu) | ||
| * πΉοΈ **Auto-hide controls** when inactive | ||
| ## Keyboard Shortcuts | ||
| --- | ||
| - `Space` β Play/Pause | ||
| - `β` β Skip backward 10s | ||
| - `β` β Skip forward 10s | ||
| - `β` β Volume up | ||
| - `β` β Volume down | ||
| ## β¨οΈ Keyboard Shortcuts | ||
| ## Props | ||
| | Key | Action | | ||
| | ------- | ----------------- | | ||
| | `Space` | Play / Pause | | ||
| | `β` | Skip backward 10s | | ||
| | `β` | Skip forward 10s | | ||
| | `β` | Volume up | | ||
| | `β` | Volume down | | ||
| | Prop | Type | Default | Description | | ||
| | ------------ | ---------------- | --------- | ------------------------------- | | ||
| | src | string | required | Video source URL | | ||
| | controls | boolean | true | Show custom controls | | ||
| | autoplay | boolean | false | Auto play video | | ||
| | muted | boolean | false | Mute video initially | | ||
| | loop | boolean | false | Loop video | | ||
| | contextMenu | boolean | false | Enable right-click context menu | | ||
| | poster | string | - | Poster image URL | | ||
| | width | string \| number | '100%' | Video width | | ||
| | height | string \| number | 'auto' | Video height | | ||
| | className | string | '' | Additional CSS class | | ||
| | color | string | '#ff0000' | Theme color for controls | | ||
| | onPlay | function | - | Called when video starts | | ||
| | onPause | function | - | Called when video pauses | | ||
| | onTimeUpdate | function | - | Called on time update | | ||
| | onEnded | function | - | Called when video ends | | ||
| --- | ||
| ## License | ||
| ## βοΈ Props | ||
| MIT | ||
| | Prop | Type | Default | Description | | ||
| | -------------- | ------------------------ | ----------- | ------------------------------- | | ||
| | `src` | `string` | required | Video source URL | | ||
| | `controls` | `boolean` | `true` | Show custom controls | | ||
| | `autoplay` | `boolean` | `false` | Auto play video | | ||
| | `muted` | `boolean` | `false` | Mute video initially | | ||
| | `loop` | `boolean` | `false` | Loop video | | ||
| | `contextMenu` | `boolean` | `false` | Enable right-click context menu | | ||
| | `poster` | `string` | `-` | Poster image URL | | ||
| | `width` | `string \| number` | `'100%'` | Video width | | ||
| | `height` | `string \| number` | `'auto'` | Video height | | ||
| | `className` | `string` | `''` | Additional CSS classes | | ||
| | `color` | `string` | `'#ff0000'` | Theme color for controls | | ||
| | `onPlay` | `() => void` | `-` | Callback when video starts | | ||
| | `onPause` | `() => void` | `-` | Callback when video pauses | | ||
| | `onTimeUpdate` | `(time: number) => void` | `-` | Called on playback time update | | ||
| | `onEnded` | `() => void` | `-` | Callback when video ends | | ||
| --- | ||
| ## π οΈ Roadmap | ||
| * [ ] Add support for subtitles/captions | ||
| * [ ] Quality switcher for multiple sources | ||
| * [ ] HLS/DASH streaming support | ||
| * [ ] Customizable keyboard shortcuts | ||
| --- | ||
| ## π License | ||
| MIT Β© 2025 β Maintained by [Your Name](https://github.com/your-profile) | ||
| --- | ||
| π Pro tip: you should also add a **screenshot or short demo gif** in the README to show off the UI. That massively improves adoption on npm/GitHub. | ||
| --- | ||
| Do you want me to also write a **`package.json` metadata (keywords, description, repo links, etc.)** optimized for npm discovery so your package ranks better? | ||
| ``` |
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
30885
-5.27%83
-32.52%