Dither Scrubber
The timeline is a row of dots, lit to where it's playing, faintly fuller where it has loaded, with a gap at each chapter and the playhead standing a dot proud. Point along it and a preview of that moment appears above, printed in dither from the video's own frames, with the time and the chapter's name; click or drag to go there. The frames are read once from a hidden copy of the video when the player comes into view, and hovering shows the nearest one read so far.
Needs: None. The video's own frames, read in the browser. A video from another site needs CORS for the previews.
Demo video made from photos by Paul Jarvis, Anton Sulsky, Dillon McIntosh, Go Wild, Danka & Peter, Andrea Boldizsar, Alex Talmon and Kenneth Thewissen on Unsplash
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| src | string | required | The video file. Another site's video needs CORS for the previews. |
| poster | string | – | A still to show before it plays. |
| chapters | { at: number; title: string }[] | – | Named stretches of the video, by start time in seconds. |
| frames | number | 48 | How many preview frames to read. |
| tone | string | – | The played part's colour. The page's accent by default. |
| cell | number | 2 | Size of one dither cell in the preview, in px. |
| step | number | 5 | Seconds the arrow keys skip. |
| className | string | – | Class on the player. It fills its container's width. |
| style | CSSProperties | – | Style on the player. |