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
* 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>
* 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
* 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>
* 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
* 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
* 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>
* 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>
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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>
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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.
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>
* 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
* 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
* 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
* 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