Every source
MP4, WebM, HLS, YouTube, Vimeo, Dailymotion and Facebook behind one consistent API and set of controls.
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.
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.
Everything the competitor offers — and a whole lot more — with no runtime dependencies to audit.
MP4, WebM, HLS, YouTube, Vimeo, Dailymotion and Facebook behind one consistent API and set of controls.
Paginated playlists (4, 6, 8 or all), autoplay-next, active-item tracking and a mobile bottom-sheet layout.
Glass, Neon, Desert and three light/alt variants, all driven by CSS variables you can override.
WebVTT subtitle/caption tracks with a language menu, plus chapter markers on the timeline.
HLS quality levels and playback-rate control, surfaced in tidy native-feeling menus.
One-call PiP and fullscreen with ARIA announcements and state reflection on the root element.
A fully typed event bus (on/once/off) for timeupdate, seeking, buffering and more.
Ships English and Chinese, with per-string overrides and full locale negotiation.
The runtime has no dependencies. hls.js is an optional peer only needed for adaptive streaming.
Click a theme to apply it to the live player above. Every colour is a CSS variable — roll your own in minutes.
Every control is reachable by keyboard, and the player ships a full shortcut set out of the box.
One ESM bundle and one stylesheet. Works with a CDN, a bundler, React or WordPress — no framework required.
<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>
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);
});
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} />;
}
// 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>