Skip to content

[1/3] feat: play html5 frames as they bake - #271

Merged
dazzatronus merged 5 commits into
mainfrom
derk/html5-progressive-1-frames
Oct 29, 2026
Merged

dazzatronus merged 5 commits into
mainfrom
derk/html5-progressive-1-frames

Conversation

@dazzatronus

@dazzatronus dazzatronus commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Until an html5 clip finished baking, playing it showed full-size stills rendered on demand. Clips also baked one after another, so an edit with several overlapping html5 clips stayed choppy for most of its wait.

A bake now stores each frame at its index as soon as the frame lands. While a clip's first bake runs, the clip plays those frames instead of rendering stills. A bake starts at the playhead's frame. Pages only seek forward, so the frames before the playhead come from a second fresh page. Bakes take turns frame by frame, ranked by the frame playback needs next, so overlapping clips under the playhead fill in together. All bakes share one 256 MiB in-flight budget, so taking turns doesn't multiply memory.

Export still renders stills mid-bake, and the cache still stores only complete bakes. A sharper re-bake keeps the complete frames on screen until it finishes.

Size: 465 lines, of which 175 are source and the rest tests. The store, the turn-taking and the playback of partial frames depend on each other, so none of them can ship alone.

Squash subject: [1/3] feat: play html5 frames as they bake. This cuts a minor release.

Verify: npx jest tests/html5-player.test.ts tests/bake-queue.test.ts tests/bake-order.test.ts. Then open an edit with several overlapping html5 clips and press play straight away. Stretches that are already baked should play smoothly before the preparing count finishes.

Risk: medium. The capture loop and the queue changed shape. A bake that stalls leaves stills on screen, as before.

PR Adds Why separate
▶ [1/3] this PR Frames land as they bake, and clips take turns The store and scheduler the rest builds on
[2/3] #272 Held frames while playing Changes what playback shows
[3/3] #273 Buffering label UI that explains the stutter

@dazzatronus
dazzatronus added this pull request to stack #273 October 28, 2026 13:41
@dazzatronus dazzatronus changed the title [1/2] feat: play html5 frames as they bake [1/3] feat: play html5 frames as they bake Oct 29, 2026
@dazzatronus
dazzatronus removed this pull request from stack #273 October 29, 2026 01:06
@dazzatronus
dazzatronus added this pull request to stack #276 October 29, 2026 01:07
@dazzatronus
dazzatronus merged commit 7e837e6 into main Oct 29, 2026
1 check passed
@dazzatronus
dazzatronus deleted the derk/html5-progressive-1-frames branch October 29, 2026 01:19
github-actions Bot pushed a commit that referenced this pull request Oct 29, 2026
# [2.30.0](v2.29.5...v2.30.0) (2026-10-29)

### Bug Fixes

* give html5 and rich-caption clips their own look on the timeline ([#275](#275)) ([7a7eb39](7a7eb39))

### Features

* hold the nearest baked html5 frame while playing ([#272](#272)) ([4f50166](4f50166))
* play html5 frames as they bake ([#271](#271)) ([7e837e6](7e837e6))
* tell viewers when html5 playback is buffering ([#274](#274)) ([65098cf](65098cf))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.30.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant