Commit Graph
541 Commits
Author SHA1 Message Date
cooleryu 982070388e fix(core): stop script loading time from shifting WAAPI frames (#5017) 2026-11-05 03:13:48 +00:00
kevin 071ec1fddd fix(runtime): fail readiness waits when a buildReady promise rejects (#5746)
A rejected window.__hf.buildReady hold now sets window.__hfStartupError naming the key and the
reason, so render, snapshot and check fail instead of capturing a scene that was never built.

Fixes #5603
2026-11-05 02:15:44 +00:00
Miguel Ángel e2a6535860 fix(core): a paused preview lets go of the scenes it has unmounted (#7195)
* fix(core): a paused preview lets go of the scenes it has unmounted

* fix(core): a paused scrub also lets go of the scenes it has unmounted
2026-11-05 01:52:51 +00:00
Vance IngallsandClaude Opus 5.5 aace91b5ec feat(core): data-motion-blur-phase sets when the shutter opens (#6983)
* feat(core): data-motion-blur-phase sets when the shutter opens

Page motion blur always centres the shutter on the frame. Add a phase in degrees of a
frame, -360 to 360: the window starts at t + phase / 360 / fps and lasts shutter / 360 /
fps. Unset stays centred, so a page without the attribute renders the same bytes.

Both tiers take the window from one place, shutterTimes in frames.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(core): the motion blur report carries the shutter phase

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* chore(core): drop the phaseDeg doc comment, the comment-share ratchet may only fall

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 01:26:35 +00:00
Miguel Ángel 3d78ac0fa6 fix(core): a logo image no longer renders stretched to the frame bottom (#7179)
* fix(core): a logo image no longer renders stretched to the frame bottom

* style(core): name the image layout exception instead of commenting it
2026-11-04 19:11:32 +00:00
Miguel Ángel 47dddedd6c fix(core): Safari audio frozen after its cut is pulled onto the playhead at 0.5 s behind, not 1 s (#7082)
* fix(core): Safari audio that sits frozen after its cut is pulled onto the playhead in 0.4 s, not 1 s

* fix(core): shorten the frozen-audio comment

* fix(core): leave a WebKit audio element that is still filling data out of the frozen rule
2026-11-03 11:17:40 +00:00
James RussoandClaude Opus 5.5 d89bf35b1d fix(core): keep overflowing content and SVG clip paths in motion-blurred frames (#7080)
* fix(core): keep overflowing content and SVG clip paths in motion-blurred frames

A blurred mover was copied only within its own layout box, so text wider
than the box (a one-line wordmark in a fixed-width container) was cut in
blurred frames. The movers-alone capture also hid every non-mover, including
the SVG clipPath a mover references, which empties the clip and makes the
mover vanish. Both showed as flicker during playback and in full renders.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(core): keep the motion-blur fix within each file's comment share

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(core): measure overflowing text with a Range, ignore rects inside the mover

A block child is as wide as its mover however long its no-wrap text, so
reading child boxes missed the common overflow layout. Read the text's own
rects through a Range. On a rotated mover each child's upright client rect
covers the mover's corners, which doubled the box at 45 degrees and could
pull a neighbouring mover into the trail; only rects that leave the
mover's own client rect now grow it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(core): measure a rotated mover's overflow unrotated

The upright client rect of a rotated mover has empty corners, so overflow
that landed there passed the "stays inside" check and was still cropped.
Measure a rotated mover with its own transform off and map the rects back
through its layout pose, then restore its style.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(core): keep a rotated mover the containing block while measured

With only transform: none, a mover with no position stops being the
containing block of its absolute and fixed children, so they jump to an
outer ancestor while measured and their real overflow is cropped. Add
will-change: transform during the swap, and skip the swap when the mover
has no transform of its own.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-03 09:59:56 +00:00
Miguel Ángel 3eead5432d fix(core): audio no longer plays fast for a moment after Play (#7067)
* fix(core): audio no longer plays fast for a moment after Play

* refactor(core): split the audio start wait out of the clock read
2026-11-03 07:30:57 +00:00
Miguel Ángel 0f85af7c7f fix(core): preview playback lands where a seek does when a set interrupts a tween (#7061)
* fix(core): preview playback lands where a seek does when a set interrupts a tween

* test(core): the preview overlap fix holds under a nested time scale and fires each callback once

* style(core): shorten the overlap comment

* refactor(core): the overlap span names its fields and carries no comments
2026-11-03 04:16:09 +00:00
Miguel Ángel eb3562966f feat(preview): an unplayable video shows its own frame while its copy is made (#6589)
* feat(preview): an unplayable video shows its own frame while its copy is made

* fix(preview): drop the comment on the copy's light flag

* fix(preview): shorten the still helper's doc comment

* test(preview): each proxy-wait test starts with no copy report left over

* fix(preview): cached still frames are swept with the proxy copies
2026-11-03 00:23:50 +00:00
Vance IngallsandClaude Opus 5.5 2bdc866c85 fix(core): a canvas in a blurred composition stays where it was laid out (#6975)
* fix(core): a canvas in a blurred composition stays where it was laid out

drawElementImage drops a nested canvas's layout offset unless the canvas
has a transform, so with capture blur on, `top: 200px` painted at 0. A zero
`translate` while captured is enough, and leaves `top`, the composition's
own `transform` and its `translate` alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(core): give the nested canvas rule no specificity

A class on a composition's canvas lost to the rule, so its own `translate`
was dropped while captured. Under `:where()` any composition rule wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 11:41:01 -08:00
Vance IngallsandClaude Opus 5.5 01c0bf4962 fix(core): a motion blur worker starting mid-film keeps the right state (#6967)
* fix(core): a motion blur worker starting mid-film keeps the right state

The mover scan walks the whole film with callbacks live, then seeks back to
the worker's start. GSAP fires one-off calls in both directions, so a worker
starting between two calls took the later call's state and held it until the
next call. Going through 0 first gives every worker what frame 0 sees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(core): rewind in the mover scan, so the filter tier gets it too

Both tiers call scanMovers and then seek to the worker's start. Rewinding
inside the scan covers them both, including the rescan after a tier handoff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 11:40:25 -08:00
Miguel Ángel e8ffaa410f fix(core): preview recovers its WebGL scenes and effects after a lost context (#7028)
* fix(core): preview repaints and rebuilds effects after the GPU restores a lost WebGL context

* fix(core): a paused scene redraws and a playing one repaints effects after a context restore

* test(core): a paused scene is redrawn after a WebGL context restore

* test(core): give the restore redraw test a clip

* fix(core): shorten the context recovery header comment

* fix(core): rebuild effects only after every lost context has restored

* test(core): the restore rebuild waits while another context is still lost

* test(core): count context requests to show the rebuild waits

* test(core): the mock reports the lost flag the test sets
2026-11-02 17:47:44 +00:00
Miguel Ángel c25e092114 fix(core): Safari audio is ready at the cut, and a stuck one resyncs in 1 s (#7024)
* fix(core): WebKit audio seeks to its in-point before its cut, and a stuck one resyncs in 1 s

* fix(core): shorten the WebKit stuck-audio comment

* fix(core): let the stuck-audio constant name stand without a comment
2026-11-02 16:46:47 +00:00
Miguel Ángel 036e41fa09 fix(core): iPhone Safari keeps one connection per file for the take on screen and the next (#7012)
* fix(core): iPhone Safari keeps one connection per file for the take on screen and the next

* fix(core): drop the doc comments the comment ratchet counts in studioPreviewMark
2026-11-02 13:15:47 +00:00
Miguel Ángel aaa5b63f55 fix(core): keep media prefetch queue ordered (#6996)
* fix(core): keep media prefetch queue ordered

* fix(core): refresh queued prefetch priorities on timing edits
2026-11-02 09:24:45 +00:00
Miguel Ángel 26d6e3eef1 fix(engine): a scene that has ended gives up its WebGL context so the next scene is not slowed (#6984)
* fix(engine): a scene that has ended gives up its WebGL context so the next scene is not slowed

* build(engine): raise the engine package size budget for the WebGL release module

* chore(engine): shorten the WebGL release comment

* fix(engine): a scene gives up its WebGL context only when the runtime says its window ended

* chore(engine): drop a comment the type already says

* chore(engine): shorten a comment line
2026-11-02 07:50:16 +00:00
Miguel Ángel e5b10f8bc2 feat(core): a heavy clip's lighter copy can be made ahead of time (#6982)
* feat(core): make a heavy clip's lighter copy ahead of time when the host asks

* feat(core): keep the comment share of the proxy transcoder where it was

* feat(core): split the copy-ahead choice so each part stays simple

* feat(core): the preview route passes the copy's urgency as the proxy options expect
2026-11-02 07:15:45 +00:00
Miguel Ángel 6bbda219bb fix(core): a smaller preview copy nobody wants any more no longer swaps in (#6973)
* fix(core): a smaller preview copy nobody wants any more no longer swaps in

* refactor(core): name the dropped copy instead of commenting it
2026-11-02 04:41:07 +00:00
Miguel Ángel 8519f28363 fix(core): a preview video short of data holds the film instead of looping snippets (#6974)
* fix(core): a preview video short of data holds the film instead of looping snippets

* fix(core): keep the comment share of the runtime files where it was
2026-11-02 04:14:40 +00:00
Miguel Ángel 9284e69fff fix(core): accept 65-point .cube LUTs, the size grading apps export (#6921)
* fix(core): accept 65-point .cube LUTs, the size grading apps export

* fix(core): shrink LUTs wider than the GPU texture limit instead of rendering black
2026-11-01 20:46:08 +00:00
Miguel Ángel 89a5953161 fix(core): music keeps playing while a preview video swaps to a new copy (#6937)
* fix(core): music keeps playing while a preview video swaps to a new copy

* refactor(core): drop a comment the constant's name already says
2026-11-01 16:55:53 +00:00
Miguel Ángel 6b3e7a7a95 fix(cli): check and snapshot free video clips the playhead left, halving memory on cut films (#6929)
* fix(cli): check and snapshot free video clips the playhead left, halving memory on cut films

* fix(core): drop the releaseMedia doc comment that raised the file's comment share
2026-11-01 14:50:41 +00:00
Miguel Ángel af0d68d612 fix(core): a resized preview video keeps its picture while its new copy loads (#6922)
* fix(core): a resized preview video keeps its picture while its new copy loads

Swapping a video to a copy made for its new size emptied it until the copy
decoded, so the preview showed black for a moment. The swap now shows a still
of the frame it had, as the video's poster, until the new copy can draw.

* fix(core): a held preview still is let go when no file loads back

* chore(core): raise the packed size budget for the held preview still
2026-11-01 12:00:26 +00:00
Miguel Ángel e181d34edc feat(core): WebKit plays bare audio from a decoded buffer on the audio clock (#6912)
* feat(core): WebKit plays bare audio from a decoded buffer on the audio clock

* fix(core): a handed-over WebKit track goes back to its element when the speed changes
2026-11-01 03:53:30 +00:00
Miguel Ángel 2c1a10f3ad fix(core): Safari keeps playing edits' audio without seeks or rate changes (#6888)
* test(player): play the WebKit audio edits in real Safari on a macOS runner

* fix(core): Safari keeps playing edits' audio without seeks or rate changes

* fix(core): keep the 0.1 s audio sync bound outside WebKit

* fix(core): restore main's audio steering outside WebKit

* fix(core): tell WebKit from the test DOM's user agent

* fix(core): name WebKit's audio start lag instead of commenting it

* fix(core): count embedded WKWebViews as WebKit for audio sync
2026-11-01 03:08:27 +00:00
Miguel Ángel bba3676a37 feat(core): the playback health reading says which clock the film followed (#6906)
* feat(core): the playback health reading says which clock the film followed

* style(core): format the clock's new reading

* refactor(core): let the clock's names say what the comments said
2026-10-31 23:29:33 +00:00
Miguel Ángel 1e5413f34c fix(core): a stuck seek in check or snapshot fails named before the protocol timeout (#6596)
* fix(core): a seek that never settles ends after 30 s and names what it waits on

* fix(core): keep the seek-wait comments within the comment limits

* fix(core): only a caller's limit ends a seek wait; check and snapshot end it before their timeout
2026-10-31 16:48:36 +00:00
Miguel Ángel 0c16afd949 fix(core): Safari stops chopping audio by seeking it over and over during playback (#6854)
* fix(core): Safari stops chopping audio by seeking it over and over during playback

* test(player): the WebKit playbench also counts audio seeks and frozen audio

* fix(core): audio still catching up is seeked once its lag passes hard sync
2026-10-31 16:12:24 +00:00
Miguel Ángel 2bd8cd95cb refactor(core): split the frozen-picture judgement so it stays under the complexity limit (#6870) 2026-10-31 02:13:23 +00:00
Vance IngallsandClaude Opus 5.5 5e4f5aefb5 fix(core): motion blur preview no longer slows down later in the timeline (#6865)
* fix(core): motion blur preview no longer slows down later in the timeline

With data-motion-blur-events="on", which Studio's Subtle and Strong write,
both blur tiers ran timeline callbacks at every per-frame pose read. Each
frame's reads step back from half a shutter ahead to the frame, so a
callback that keeps state and replays from zero on a backward seek (a
ripple simulation, for example) redid its whole history most frames, and
the cost grew with the playhead.

The mover scan still runs callbacks, so motion set from a render(t)
callback is still found. With events on, it also scans once without them,
and the per-frame reads run callbacks only when the two scans disagree.
The eventful scan runs first, so tweens take their start values after the
callbacks before them and a one-off call fires as often as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(core): keep the motion blur comments to the invariant

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(core): motion blur reads run callbacks when a callback moves any box

Comparing which elements each scan finds missed a callback that pans a
mover's ancestor while a tween also changes that ancestor: both scans
found the same movers and the same changing elements, so the reads left
the pan out. The scans now compare every changing element's box at each
step, and the reads run callbacks when any step differs.

Raises @hyperframes/core's unpacked size budget to the measured size plus
the usual 5%: main already sat 0.98% over the old budget, and this change
adds 1,232 bytes, which tipped it past the 1% tolerance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(core): silent motion blur reads land back on the frame as its own seek left it

After silent pose reads, the restore seek back to the frame left GSAP in a
different state than the frame's own eventful seek did:

- A step exactly on the frame (a .call() or set) was re-armed, so the next
  frame fired it again. Calls fired 2-5 times per crossing, and a toggle
  could end inverted.
- In renders, which keep no GSAP structure, landing back on the frame from
  later skipped same-time steps' authored order, so the frame showed the
  first of two sets instead of the last.

Events-off blur always read silently and had both. This PR moves events-on
roots without callback-driven motion (the Studio default) onto that path,
so both are fixed here.

The host's new holdFrame snapshots every landing mark on the root and scene
timelines before the reads, and its restore seeks back silently, redraws in
authored order where there is no structure, and puts the marks back. Each
call now fires once per frame crossing, as without blur, and same-time sets
land as authored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(core): a held render frame draws its scenes first, so the root lands last

holdFrame redrew the root and then the scenes, the reverse of the frame's
own seek. When a scene and the root tween one property, the frame landed
on the scene's value instead of the root's.

The hold and landing move into the GSAP adapter as holdFrameMarks, which
takes the scenes and the root separately, so the order lives in one place
a real-GSAP test can pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 18:21:27 -07:00
Miguel Ángel 443ded4261 fix(player): preview voice no longer goes silent while other tracks play (#6859)
* fix(core): audio that decodes short plays from its element in preview

* fix(core): keep the decoded copy when the element's duration is unknown

* fix(player): preview pauses with Buffering until every track due can play

* fix(core): keep the transport awake while it buffers

* fix(core): wait only for tracks the clock would also treat as playable

* test(core): buffering fixture pauses like a browser, with a pause event

* fix(core): hold for a clip only after media sync has asked it to play

* test(core): hold lands on the frame a slow tick skips into a clip with no data

* fix(core): a held clip counts as ready once it has data buffered ahead
2026-10-30 21:25:28 +00:00
Miguel Ángel 359b6c8a38 feat(core): playback health reports how long a video on screen showed no moving picture (#6856)
* feat(core): playback health reports how long a video on screen showed no moving picture

* fix(core): a frozen picture is judged by the clip's own timing, not the film's

* style(core): shorten a test comment under the line limit

* fix(core): the frozen-picture check reads a video from any realm

* refactor(core): cut the frozen-picture comments the comment ratchet counts
2026-10-30 18:48:25 +00:00
Miguel Ángel aafbd96b77 fix(core): same-time sets at 0 land in authored order on the first frame (#6851) 2026-10-30 18:29:40 +00:00
Miguel Ángel 07c714ce9b fix(core): the first cut after Play starts on time instead of running ahead (#6794)
* fix(core): the first cut after Play starts on time instead of running ahead

* fix(core): learn half the start delay from Play so the first cut keeps its last frame
2026-10-30 08:24:36 +00:00
Miguel Ángel d83f276743 perf(studio): films with thousands of timed clips stop re-reading every clip each frame (#6805)
* perf(studio): films with thousands of timed clips stop re-reading every clip each frame

* perf(studio): drop the added comment lines the ratchet counts
2026-10-30 07:27:26 +00:00
Miguel Ángel 9fd90d23c4 fix(core): long cut-list edits play every cut without dropped or late frames (#6785)
* fix(core): a video plays to the last frame before its out-point instead of stopping a frame early

* fix(core): a dropped frame before an out-point no longer lets the out-point's frame show

* perf(core): a video edit with no animation timeline stops rewriting every clip each frame

* refactor(core): drop the comments the comment ratchet counts

* fix(core): a clip that has fully downloaded stays loaded and plays on time

* refactor(core): drop the comments the comment ratchet counts
2026-10-30 05:01:56 +00:00
Miguel Ángel 471d60a8ac fix(core): the playhead keeps moving at a cut while the incoming take has not started (#6768)
* fix(core): the playhead keeps moving at a cut while the incoming take has not started

* fix(core): shorten a comment in the clock

* fix(player): keep the WebKit stops script out of the type check

* fix(core): cut two comments from the clock
2026-10-30 02:25:26 +00:00
Miguel Ángel 93f3d3dcbb fix(core): the preview's scene window settles when a scene can't unmount instead of hanging the page (#6740)
* fix(core): the preview's scene window settles when a scene can't unmount instead of hanging the page

* refactor(core): name the scene window's stuck step instead of commenting it
2026-10-29 12:04:12 +00:00
Miguel Ángel 48ba0e5b2b fix(player): iPhone Safari keeps every take's sound after the first seconds of an edit (#6724)
* fix(player): iPhone Safari keeps every take's sound after the first seconds of an edit

* fix(player): shorten the priming comment

* fix(player): prime iPhone takes only, and only unmuted ones

* fix(player): shorten a comment

* fix(player): skip only clips authored muted, and drop a doc comment
2026-10-29 07:56:37 +00:00
Miguel Ángel cf15892425 fix(cli): a snapshot still shows what playback shows, whatever other times are asked for (#6720)
* fix(cli): a snapshot still shows what playback shows, whatever other times are asked for

* test(cli): pin that still-capture pages ask for the skipped-frame replay
2026-10-29 06:44:51 +00:00
Miguel Ángel fa9acbd739 fix(core): a multi-worker or chunked render lands every frame where an in-order render does (#6707)
* fix(core): a multi-worker or chunked render lands every frame where an in-order render does

* fix(core): replay only where tweens overlap, and from any off-grid scene time

* fix(core): a film with paused scenes replays only where its tweens overlap
2026-10-29 04:58:34 +00:00
Miguel Ángel 3ca1005a81 feat(producer): report which element set the film length (#6689)
* feat(producer): report which element set the film length

* fix(core): keep the duration guard and comment share in step with the length helper
2026-10-28 19:05:59 +00:00
Miguel Ángel aa4a71fe41 fix(core): graded media honors object-position vertically instead of mirroring it (#6691)
* fix(core): graded media honors object-position vertically instead of mirroring it

* fix(core): name the bottom-up position instead of commenting it
2026-10-28 18:48:57 +00:00
Miguel Ángel 9aa6346a77 fix(studio): audio keeps playing after a timeline move or trim in a static composition (#6428)
A composition with no GSAP timeline was treated as zero length after an edit, which dropped preview audio, and an edit made during playback left the transport stopped. The runtime now keeps the declared length when it rebinds, and the soft reload resumes a transport that was playing.
2026-10-28 18:34:56 +00:00
Vance IngallsandClaude Opus 5.5 09b1290474 feat(core): grade groups grade a whole lane from one hf-color-group (#6678)
An inert <hf-color-group> holds a lane's data-color-grading; <video>, <img>
and <canvas> join with data-color-group. A member's own grading overrides
its group's. The runtime discovers members, regrades them when the group's
grading or a member's data-color-group changes, and ungrades them when the
group element or its grading goes, drawing only members on screen.

Render keeps group-graded video at full size like directly graded video,
and lint accepts (and still validates) grading on hf-color-group.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 10:10:42 -07:00
Miguel Ángel cf627a8619 fix(core): a preview media load that fails is reported, not swallowed (#6666)
* fix(core): a preview media load that fails is reported, not swallowed

* fix(core): an audio fed by source children reports its failed load; the shape lives in the protocol

* fix(core): the audio load watcher finds elements from any realm

* build(core): regenerate the inline position-edits render script
2026-10-28 13:49:30 +00:00
Xuanru Li 205c1a31d3 fix(inspector): live queries see every composition, wherever the playhead is (#6651)
* fix(inspector): live queries see every composition, wherever the playhead is

The Studio preview parks scenes away from the playhead, so a live inspect, timeline or
element-map query answered missing for every element in a parked composition. Each live
query now holds every scene mounted under its own holder, then hands the scene window back.
__hfHoldScenes keeps holds per holder, so the inspector letting go never drops a scene
Studio holds.

* fix(inspector): isolate concurrent live query scene holds
2026-10-28 10:39:49 +00:00
Miguel Ángel 3cc296845a feat(core): name why a choppy preview window dropped frames (#6634)
* feat(core): name why a choppy preview window dropped frames

The playback reading now says how much of the window was frames skipped
and how much was a playing video waiting for data, and carries the p50
and p95 gap between the runtime's ticks, so a report can tell a slow
compositor from a stalled decoder.

* chore(core): drop comments the ratchet counts
2026-10-28 07:25:00 +00:00
Miguel Ángel 9eaf9efb69 fix(core): a graded clip's canvas no longer comes out blank on a real GPU (#6615)
* fix(core): a graded clip's canvas no longer comes out blank on a real GPU

* chore(core): cut the comments the grading fix added

* fix(core): a clip that outgrows the GPU's buffer goes back to its source video
2026-10-28 04:14:32 +00:00