v1.1 — production ready

One player for every video source.

Spark Player is a dependency-free HTML5 video player with a smart, paginated playlist. Paste a URL — MP4, WebM, HLS, YouTube, Vimeo, Dailymotion or Facebook — and it just plays. Six themes, typed events and a tiny footprint.

◎ Zero runtime dependencies ◈ 6 built-in themes ⌁ 27 typed events ⤓ HLS via optional hls.js ⌨ Full keyboard control
Live demo

Everything, in one place

Play a clip, switch themes, change pagination, toggle captions and watch the live event log update in real time — all running on the exact bundle you would ship.

● Live
Why Spark Player

Feature-complete, dependency-free

Everything the competitor offers — and a whole lot more — with no runtime dependencies to audit.

🌐

Every source

MP4, WebM, HLS, YouTube, Vimeo, Dailymotion and Facebook behind one consistent API and set of controls.

📃

Smart playlist

Paginated playlists (4, 6, 8 or all), autoplay-next, active-item tracking and a mobile bottom-sheet layout.

🎨

Six themes

Glass, Neon, Desert and three light/alt variants, all driven by CSS variables you can override.

💬

Captions & chapters

WebVTT subtitle/caption tracks with a language menu, plus chapter markers on the timeline.

⚡

Quality & speed

HLS quality levels and playback-rate control, surfaced in tidy native-feeling menus.

🖼️

Picture-in-picture

One-call PiP and fullscreen with ARIA announcements and state reflection on the root element.

🔔

27 typed events

A fully typed event bus (on/once/off) for timeupdate, seeking, buffering and more.

🌍

i18n built in

Ships English and Chinese, with per-string overrides and full locale negotiation.

📦

Zero dependencies

The runtime has no dependencies. hls.js is an optional peer only needed for adaptive streaming.

Themes

Six looks, one line each

Click a theme to apply it to the live player above. Every colour is a CSS variable — roll your own in minutes.

Keyboard

Drive it without a mouse

Every control is reachable by keyboard, and the player ships a full shortcut set out of the box.

Play / pauseSpace
Play / pauseK
Seek forward / back← →
Volume up / down↑ ↓
Mute / unmuteM
FullscreenF
Next videoN
Previous videoP
Integrate

Drop it in anywhere

One ESM bundle and one stylesheet. Works with a CDN, a bundler, React or WordPress — no framework required.

CDN · zero build
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/spark-player/dist/spark-player.css">
<div id="player"></div>
<script type="module">
  import { SparkPlayer } from 'https://cdn.jsdelivr.net/npm/spark-player/dist/spark-player.js';

  new SparkPlayer('#player', {
    theme: 'glass',
    playlist: [
      { src: 'video.mp4', title: 'My video', poster: 'poster.jpg' }
    ]
  });
</script>
Vanilla · npm
import { SparkPlayer } from 'spark-player';
import 'spark-player/css';

const player = new SparkPlayer('#player', {
  playlist,
  theme: 'neon',
  pageSize: 6,
  autoplayNext: true
});

player.on('ended', function (e) {
  console.log('finished item', e.index);
});
React
import { useEffect, useRef } from 'react';
import { SparkPlayer } from 'spark-player';
import 'spark-player/css';

export function Video({ playlist }) {
  const host = useRef(null);

  useEffect(() => {
    const player = new SparkPlayer(host.current, { playlist });
    return () => player.destroy();
  }, [playlist]);

  return <div ref={host} />;
}
WordPress
// functions.php — enqueue the bundle
add_action('wp_enqueue_scripts', function () {
  wp_enqueue_style('spark-player',
    'https://cdn.jsdelivr.net/npm/spark-player/dist/spark-player.css');
  wp_enqueue_script('spark-player',
    'https://cdn.jsdelivr.net/npm/spark-player/dist/spark-player.js',
    array(), null, true);
});

// Shortcode: [spark_player src="video.mp4" title="My video"]
// Renders <div data-spark-player data-options='{...}'></div>