Skip to content

[2/3] feat: hold the nearest baked html5 frame while playing - #272

Merged
dazzatronus merged 2 commits into
mainfrom
derk/html5-progressive-2-held
Oct 29, 2026
Merged

dazzatronus merged 2 commits into
mainfrom
derk/html5-progressive-2-held

Conversation

@dazzatronus

@dazzatronus dazzatronus commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

A playing html5 clip still rendered a full-size still at every frame its bake hadn't drawn yet. Stills share the main thread with the bake, so pressing play slowed the bake that playback was waiting on.

A playing clip now holds the latest baked frame, provided it is at most 7 frames behind the playhead (233 ms at 30 fps). Further back than that, it renders a still as before. The frame on screen stays up until a newer one lands. Playback never steps back to an older frame, and it never decodes the frame it already shows. Paused or scrubbed, a clip shows the exact frame, so pausing on a held frame renders the exact one.

The measurements below cover this PR and [1/3] together. The edit has 15 overlapping html5 clips. Each run covers the first 30 s of play straight after opening, in headless Chrome with the GPU. There were 5 runs, with each clip weighted by how much of the picture it covers.

  • Screen time within one frame of the playhead: 16% before, 41% after.
  • How far frames trail the playhead (p95): 1.4 s before, 0.33 s after.
  • Longest freeze on a large layer: 3.4 s before, 1.5 s after.
  • The loading placeholder no longer shows, where it used to cover 5% of screen time.

Squash subject: [2/3] feat: hold the nearest baked html5 frame while playing. This cuts a minor release.

Verify: npx jest tests/html5-player.test.ts -t "hold|held|7 frames|steps back|pauses". Then press play straight after opening an edit with html5 clips. Motion should be choppy where the bake is thin and should never jump backwards. Pausing should show a sharp frame.

Risk: low. Where no baked frame is within 7 frames, stills take over as before.

PR Adds Why separate
[1/3] #271 Frames land as they bake, and clips take turns The store and scheduler this PR builds on
▶ [2/3] this PR Held frames while playing Changes what playback shows
[3/3] #274 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 [2/2] feat: hold the nearest baked html5 frame while playing [2/3] feat: hold the nearest baked html5 frame while playing 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
Base automatically changed from derk/html5-progressive-1-frames to main October 29, 2026 01:07
@dazzatronus
dazzatronus force-pushed the derk/html5-progressive-2-held branch from e56d4c2 to c0dc65d Compare October 29, 2026 01:07
@dazzatronus
dazzatronus merged commit 4f50166 into main Oct 29, 2026
1 check passed
@dazzatronus
dazzatronus deleted the derk/html5-progressive-2-held 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