Video Player
stableA fully-featured HTML5 video player with playlists, chapter markers, SRT/VTT subtitles, video filters, quality levels, and HLS adaptive streaming.
Basic usage
Examples
With playlist
Pass an array of items to enable the built-in playlist panel with shuffle and repeat.
With chapters
Chapters are displayed as markers on the progress bar with tooltip titles.
YouTube video
Pass any YouTube URL — the player automatically detects it and renders a native YouTube embed.
Features
- HLS adaptive streaming via hls.js — automatic quality switching.
- Playlist with shuffle and repeat modes.
- Chapter markers with tooltip labels and progress-bar marks.
- SRT and VTT subtitle support with font, color, and position controls.
- Video filter sliders: brightness, contrast, saturation, hue, blur, and sepia.
- Quality level selection for HLS streams.
- Thumbnail preview on progress-bar hover.
- Picture-in-Picture and Fullscreen APIs.
- Full keyboard shortcut set (Space, ←/→, ↑/↓, M, F, P, C).
- Consumes @structyl/themes CSS tokens — respects your theme automatically.
Installation
bash
pnpm dlx structyl add video-playerAPI Reference
Video Player API reference
Full props, types, defaults.
Keyboard interactions
| Key | Description |
|---|---|
| Space / K | Toggle play/pause. |
| → | Skip forward 10 seconds. |
| ← | Skip backward 10 seconds. |
| ↑ | Increase volume by 10%. |
| ↓ | Decrease volume by 10%. |
| M | Toggle mute. |
| F | Toggle fullscreen. |
| P | Toggle Picture-in-Picture. |
| C | Toggle subtitles. |
| . | Advance one frame (1/30 s). |
| , | Go back one frame (1/30 s). |