Thumbnails plugin

0.5 KB gzip
@tomato-player/plugin-thumbnails

Shows a preview image above the seek bar while you hover or drag. It reads the standard WebVTT thumbnail format, with sprite-sheet coordinates in #xywh fragments.

Bring your own assets
This plugin needs files from your pipeline (a WebVTT sprite-sheet track), so this page shows the setup only.

Install

npm i @tomato-player/plugin-thumbnails

Usage

player.ts — ts
import { createPlayer } from '@tomato-player/core';
import { minimal } from '@tomato-player/skin-minimal';
import { thumbnails } from '@tomato-player/plugin-thumbnails';
​
createPlayer('#player', {
src: 'movie.mp4',
skin: minimal(),
plugins: [thumbnails({ src: '/thumbnails.vtt' })],
});

Options

OptionTypeDescription
srcstringURL of the WebVTT thumbnail track.

Other plugins

HotkeysKeyboard shortcuts with familiar defaults, fully remappable.
GesturesDouble-tap to seek on touch, with visual feedback.
ChaptersChapters from an array or WebVTT, with seek-bar markers.
PlaylistNext and previous, auto-advance and loop.
AnalyticsVendor-neutral QoE events: startup time, quartiles, rebuffering, watch time.
Media SessionLock-screen controls, artwork and hardware media keys.
PersistRemember volume, speed, captions and resume position.