Chapters

plugin

WebVTT chapters with seek-bar markers and a live chapter list.

ChaptersLoading chapters…
Big Buck Bunny © Blender Foundation, CC BY 3.0, via Wikimedia Commons. HLS test stream by Mux, DASH by Akamai.

The code

tsx
import { chapters } from '@tomato-player/plugin-chapters';
​
const player = createPlayer('#player', {
src: 'movie.mp4',
skin: learn(),
plugins: [chapters({ chapters: '/chapters.vtt' })],
});
​
player.on('plugin:chapterchange', (chapter) => highlight(chapter.title));
const list = player.plugin('chapters').list();