video-player-lib
v1.1.2
Published
Custom HTML video player with advanced controls
Maintainers
Readme
A modern, customizable video player built with TypeScript, featuring YouTube-like controls and seamless browser integration.
Features ✨
- ▶️ Play/Pause controls
- ⏪⏩ Step forward/backward (10 seconds)
- 🔈 Volume slider
- 📊 Interactive progress bar with time display
- 🖥️ Fullscreen toggle
- 📱 Responsive design
- 🎨 Customizable UI via CSS
- 🚀 TypeScript support
Installation 💻
Via npm
npm install video-player-libDevelopment 👨💻
- Clone repo:
git clone https://github.com/Ereh11/Video-Player.git- Install dependencies:
npm install- Build:
npm run buildUsage 🛠️
1- Create HTML page and make a container with any id like
<div id="video-container"></div>2- Create JS script with
import CustomVideoPlayer from 'video-player-lib';
const player = new CustomVideoPlayer(
'video-container',
'https://example.com/video.mp4'
);3- Customization 🎨 Override CSS variables in your stylesheet:
:root {
--primary-color: #ff4757;
--control-bg: rgba(0,0,0,0.8);
--progress-height: 6px;
}Contributing 🤝
PRs welcome! Please open an issue first to discuss changes.
License 📄
MIT © [Hani Saad, [email protected]]
