Skip to content

feat(site): video chapters with a chapter scrubber, and a sitemap - #44

Merged
Zach Dunn (zachdunn) merged 3 commits into
mainfrom
claude/video-export-chapters-e0df0a
Oct 16, 2026
Merged

Zach Dunn (zachdunn) merged 3 commits into
mainfrom
claude/video-export-chapters-e0df0a

Conversation

@zachdunn

@zachdunn Zach Dunn (zachdunn) commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

What this changes

Chapters in video exports. motion.mjs --mp4 | --webm now writes one chapter per scene into the file, named by the scene's label (or its headline if it has none). Consecutive scenes with the same label count as one chapter. It also writes <story>-motion.vtt beside the video with the same chapters. QuickTime, VLC and IINA list the embedded chapters. export.mjs takes them as --chapters <file.json>. Single-scene clips and GIFs get no chapters.

The three example videos were remuxed (stream copy, no re-render) to carry their chapters. Each also gets a committed motion.vtt.

The site's player. Browsers' own video controls don't show chapters, whether from the MP4 or a <track kind="chapters">, and they can't be restyled into segments. The example pages now have their own controls:

  • Scrubber: one segment per chapter. A click or drag seeks, and hovering shows the time and chapter name.
  • Buttons: play/pause, mute and full screen (Chrome's full screen keeps these controls).
  • Keyboard: arrow keys move 5 s, Page Up and Page Down move a chapter, Home goes to the start, and Space plays or pauses.
  • Fading: the controls fade while the video plays and the pointer rests. On a touch screen, tapping a faded video brings them back instead of pausing.
  • Fallback: without JavaScript, the browser's own controls stay.

The chapters are also listed under the player, with the current one highlighted. The video still carries a <track kind="chapters">.

Sitemap. When built with --url, as the deploy is, the site build writes sitemap.xml and a robots.txt that points to it. The sitemap lists the home page, the examples page, and each example with its slides. A build without --url writes neither, because a sitemap needs absolute URLs.

.gitattributes: *.sh text eol=lf.

The Sunny example's player: a segmented scrubber with a tooltip reading 0:35 · 03 Floors and projects, and the chapter list below with 02 · The plan in the corner highlighted

The Uploads example's player at phone width: play, segmented scrubber, mute and full screen, with the chapter list as one column

Why

The cuts are already built as chapters (the scene labels read 02 · The plan in the corner). Viewers should be able to see that structure and jump to the part they want, both in the downloaded file and on the site.

Checks

  • A line under Unreleased in CHANGELOG.md.
  • node --test dev/test/*.test.mjs passes (122 tests).
  • Checked with ffprobe that the chapters and cover art are present in exported MP4 and WebM files.
  • Checked in the browser at desktop and phone width: click, drag, hover tooltip, keyboard, mute, and the chapter list. Full screen was checked in headless Chrome, since the app's browser pane refuses it.
  • Not checked: Safari and iOS. On iOS, full screen falls back to the native player.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 2
  • coderabbit:review
  • review
🚫 Excluded labels (none allowed): 1
  • wip

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9ced1f35-d98e-4d34-a4c5-f00b5cf97428

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@uploads-sh

uploads-sh Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

4 files · View all on uploads.sh →

chapters-desktop.webp

chapters-phone.webp

player-desktop.webp

player-phone.webp

Maintained by uploads.sh · add media: uploads put <file> --pr 44 · docs

@zachdunn Zach Dunn (zachdunn) changed the title feat(motion): chapters in video exports and a chapter scrubber on the site's player feat(site): video chapters with a chapter scrubber, and a sitemap Oct 16, 2026
@zachdunn
Zach Dunn (zachdunn) merged commit 40c0652 into main Oct 16, 2026
3 checks passed
@zachdunn
Zach Dunn (zachdunn) deleted the claude/video-export-chapters-e0df0a branch October 16, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant