Using KapitelJS
To create an instance of KapitelJS, import it and pass an HTMLMediaElement, e.g. a and an element that will be used as a container for the timeline.
; const container = document;const video = document; const kapitel = video container;
Filling the timeline
Use the method addChapter to add chapters to your Kapitel instance
kapitel; kapitel;
You can also add multiple chapters using addChapters, which takes an array of chapter objects
kapitel;
New chapters will be sorted by time, no need to worry about sorting your chapters before adding them
kapitel;
Configuring Kapitel
You can enable different features as well as change the styling when creating an instance of Kapitel
const options = // these will let you create chapters with ease createChapterButton: true exportChaptersButton: true // while these will limit the style of the container maxHeight: '200px' height: '10vh'; const kapitel = video container options;