qalbplayer
v1.0.2
Published
A custom open-source React video player with video, shorts, and live modes, HLS support, custom controls, gestures, and keyboard shortcuts.
Maintainers
Readme
qalbplayer
qalbplayer is a custom React / Next.js video player package for long videos, shorts/reels, and live HLS streams.
Install
npm install qalbplayerNext.js App Router usage
Import the CSS once in src/app/layout.tsx:
import "qalbplayer/style.css";Use the component in a client component:
"use client";
import { QalbPlayer } from "qalbplayer";
export default function Page() {
return (
<QalbPlayer
url="https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8"
mode="video"
autoplay={false}
/>
);
}Props
export interface QalbPlayerProps {
url: string;
mode: "video" | "shorts" | "live";
poster?: string;
autoplay?: boolean;
className?: string;
}Features
- Raw HTML5 video foundation.
- Dynamic
hls.jsloading for.m3u8adaptive streaming. - MP4/native fallback.
videomode with 16:9 YouTube-style controls.shortsmode with 9:16 vertical layout and tap-to-mute behavior.livemode with LIVE badge, connection timer, disabled scrubbing, and offline fallback.- YouTube-style blue/green gradient progress bar.
- Click, drag, and mobile pointer scrubbing for non-live videos.
- SVG icons for play, pause, volume, mute, settings, PiP, theater, and fullscreen.
- Center play/pause ring animation.
- Double-click left/right skip for long videos.
- Long press 3.0x temporary speed boost for non-live videos.
- Playback speed menu.
- HLS quality selector using available HLS levels.
- Keyboard shortcuts: Space, arrows, M, F, T.
- CSS-only loading spinner.
Publish
npm publish --access public