structyl

Video Player

stable

A fully-featured HTML5 video player with playlists, chapter markers, SRT/VTT subtitles, video filters, quality levels, and HLS adaptive streaming.

Basic usage

0:00 / 0:00

Examples

With playlist

Pass an array of items to enable the built-in playlist panel with shuffle and repeat.

0:00 / 0:00

With chapters

Chapters are displayed as markers on the progress bar with tooltip titles.

0:00 / 0:00

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-player

API Reference

Video Player API reference

Full props, types, defaults.

View API

Keyboard interactions

KeyDescription
Space / KToggle play/pause.
Skip forward 10 seconds.
Skip backward 10 seconds.
Increase volume by 10%.
Decrease volume by 10%.
MToggle mute.
FToggle fullscreen.
PToggle Picture-in-Picture.
CToggle subtitles.
.Advance one frame (1/30 s).
,Go back one frame (1/30 s).
Video Player | structyl