mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-24 16:06:34 +00:00
49333a882d343cef768f16739a84643296e9da5d
780
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
99c389bce9 |
fix(core): a cropped element's edge stays exact while GSAP tweens it (#5010)
* fix(core): a cropped element's edge stays exact while GSAP tweens it * fix(core): configure GSAP while the runtime script runs, before compositions set elements * test(studio): bank the six crop-scale cases that now pass * test(producer): regenerate the png-sequence and mov-prores goldens for 2D GSAP transforms * test(core): a non-configurable window.gsap is configured without a crash * test(studio): re-bank the edit accuracy baseline from this branch's current head |
||
|
|
399f49104e |
fix(studio): a first animation in a full-document sub-composition plays (#5008)
* fix(studio): a first animation in a full-document sub-composition plays * fix(studio): keep the comment share of the two touched files at their base * fix(studio): a first animation also plays when <html> carries the composition id * fix(studio): a root whose id sits on <html> keeps its first animation in <body> * fix(studio): a composition id on the template tag keeps the first animation inside it |
||
|
|
805cf60b03 |
fix(core): the preview redraw leaves animations after the playhead as the seek drew them (#4997)
* fix(core): the preview redraw leaves animations after the playhead as the seek drew them The redraw that re-renders a timeline at its playhead steps silently to just below it and back. That backward step drew every reversed child that starts later at its end (a reversed set showed 0.8 where the seek showed 0.2), and the landing never revisited it. Children starting after the playhead now sit out both steps. The redraw also puts back the zero-duration state of every zero-duration child, not only those with callbacks, so two sets on the playhead keep their authored order on the next seek and a call in an otherwise empty nested timeline fires as often as without the redraw. * refactor(core): collect children after the playhead without a per-child array * fix(core): a scene's opening set disappears when you step back off the scene's start The redraw's silent round trip left a nested timeline's start-crossing mark (_zTime) on the wrong side, so the next backward seek skipped the scene and its opening set stayed drawn. The redraw now restores that mark for every nested timeline as well as every zero-duration child. * refactor(core): name the redraw's playhead tolerance instead of commenting it * fix(core): a pause inside a reversed repeating scene fires once after a redraw The redraw renders a nested timeline the seek had left inactive, which marks it active. With its start-crossing mark restored but not its active flag, the next seek re-ran the scene's pause. The redraw now restores the active flag too. * fix(core): a held redraw no longer cuts a paused scene short in renders Holding later children at time scale 0 let GSAP recompute a nested timeline's duration during the redraw's round trip without them, so a paused sub-composition kept a shortened length and froze for the rest of the render (style-5-prod's typed intro). After restoring the time scales, every ancestor of a held child is marked dirty and the duration is settled again. * fix(core): the redraw puts back the scene lengths it measured, not re-measures them Re-settling after the hold recomputed the root's length from whatever was paused at that moment, which the redraw should not change. The cached lengths of the held children's ancestors are now snapshotted after the entry settle and restored in the finally. |
||
|
|
44b5836250 |
fix(core): composition scripts start after web fonts are ready, so renders repeat (#4980)
* fix(core): composition scripts start after web fonts are ready A scene script that measures text (offsetHeight, getBoundingClientRect) ran while the page parsed, often before its web font loaded, so it laid the scene out with fallback metrics. Renders of the same film differed run to run, and preview could differ from export. The compilers now give every body script a type the browser does not run (text/hf-after-fonts, or +module), through one helper in scriptRuns.ts called at the end of the bundler, the producer compile and the sub-composition preview. The Studio motion script is emitted the same way so it still runs after them. The runtime entry owns the wait: on DOMContentLoaded it forces a layout, waits for document.fonts.ready or FONT_WAIT_TIMEOUT_MS (5 s), then re-creates each script in its own place in parser order (classic in order, awaiting src loads; then module and defer scripts in insertion order), boots as before, and calls the DOMContentLoaded and load listeners the scripts added. On timeout the scripts run anyway and runtime_font_wait_timeout names the families still loading. Scene swaps and the composition loader use the same wait. * fix(core): a page whose runtime predates the font gate still runs its scripts A bundle can be served with a runtime loaded from HYPERFRAME_RUNTIME_URL. If that runtime is older than the font gate, nothing would run the deferred composition scripts and the film would be blank. Whenever the marking helper defers scripts, it also puts one small inline script first in the head. At DOMContentLoaded it runs the deferred scripts in parser order itself, without waiting for fonts and with a console warning, unless a runtime has claimed them. The gate's runtime claims them when it loads, before DOMContentLoaded, so the scripts run exactly once either way. * fix(studio-server): motion paths animate in Studio preview when gsap loads in the body The MotionPathPlugin tag Studio inserts after a body gsap script now carries that script's type, so the runtime runs it right after gsap once fonts are ready, instead of before gsap exists. * fix(cli): layout, motion-shot and validate wait for the composition scripts to run The three commands waited on the timeline registry, which exists as soon as the runtime file loads, or on a flat sleep. They now wait for the runtime's render-ready flag through one shared helper, keeping each command's timeout and proceeding as before when it passes. * fix(core): a script that wraps addEventListener keeps its wrapper after its scripts run While composition scripts run, the runtime patches addEventListener to hold load events that already passed. Putting the original back now happens only if the patch is still in place, so a library wrapper installed meanwhile survives. * docs: comments on script timing match scripts that wait for web fonts The early stub's flush and the player's iframe-load handler described page scripts as done by DOMContentLoaded and the runtime as ready before load. Composition scripts now wait for web fonts, so both can come later. Comment-only. * test(core): pin script order after an external script and the scene swap's font wait An inline composition script that follows an external one sees its global, and a scene swap runs the new scene's script only once web fonts are ready. * docs(producer): the early stub comment names what drains late font-gated work * fix(studio): motion paths add without a flash when gsap loads after web fonts Studio preloads MotionPathPlugin on iframe load. A body gsap now runs after web fonts, often after that load, so the preload retries once the runtime reports ready. * test(cli): pin the runtime wait before each command first samples the page * fix(studio): the motion path preload stops waiting once the preview runtime has booted A composition with no global gsap posts ready before the preload runs; the retry listener then never detached and kept each retired preview document alive. It now waits only while the runtime has not booted, and the tests pin the cleanup and the ready filter. * fix(studio): a preview frame that never boots is not kept alive by the motion path preload Only the latest preview waits for the ready message of its runtime; a newer load drops the older wait, so a crashed or missing composition frame can be collected. * style: comments added by the font gate move into names |
||
|
|
351d389c0b |
test(core): pin three composition-length rules that no test covered (#5000)
* test(core): pin the authored floor's direct children, the one-frame media skip and lottie sources * test(core): pin the loaded-Lottie-library half of the pending rule |
||
|
|
34ff5ca1de |
refactor(core): one pure owner for composition length and root size (#4990)
* test(core): pin how the runtime resolves a composition's length and size * refactor(core): move composition length and root size rules into a pure module * test(core): pin the one-frame timeline floor against a derived length * fix(core): build and declare the composition-length subpath, reject a non-finite declared length |
||
|
|
4e118824b3 |
fix(studio-server): freeze still appears whole, so a slow extraction cannot break its undo (#4982)
* fix(studio-server): freeze still appears whole, so a slow extraction cannot break its undo The freeze route reserved the still's final name with an empty file before ffmpeg ran. When extraction outlasted the history's quiet time, history committed that empty file as an outside change, and Cmd+Z then restored a 0-byte PNG. ffmpeg now writes under an atomic temp name the history skips, and the still is published with createFileAtomically (EEXIST still refuses a taken name). * fix(core): a direct exclusive write that fails midway leaves no partial file Without hard links, createFileAtomically writes the destination directly. A full disk then left a partial file behind (a corrupt upload or freeze still); it is now removed, and a name another writer holds is never touched. Freeze tests: the slow-extraction test leaves a half-written temp file while history commits, and concurrent extractions meet at a barrier instead of a real timer. * fix(core): a quota reported only at close still removes the partial file * test(core): the direct write closes once and keeps its write error when cleanup fails * test(core): a failed direct write closes its descriptor exactly once * refactor(studio-server): freeze names carry what their comments said |
||
|
|
a8dcdd109a |
fix(core): a call on the playhead fires once when the preview redraws it (#4981)
* fix(core): a call on the playhead fires once when the preview redraws it The silent redraw steps off the playhead and back, which re-armed a call sitting exactly on it, so the following seek fired it again. Keep each such call's fired state across the redraw. * fix(core): a redraw keeps every call's fired state, wherever the call sits Restoring one field for calls found by position missed a fresh call at 0, calls in repeating or reversed timelines and double-speed scenes. Snapshot ratio and _zTime of every zero-duration callback tween instead. |
||
|
|
cd1a34ceca |
fix(studio): one owner for gsap CDN URLs, so MotionPathPlugin matches the composition's gsap (#4976)
* fix(studio): load MotionPathPlugin at the composition's own gsap version * fix(core): list the gsap-cdn subpath where core's exports are generated from * fix(core): every default gsap URL comes from the one gsap-cdn owner * fix(core): the gsap a new composition or first tween gets comes from the gsap-cdn owner |
||
|
|
96bc879b5b |
perf(core): a paused Studio drag lets the preview loop sleep until the drag ends (#4938)
* perf(core): a paused Studio drag lets the preview loop sleep until the drag ends A paused manual-edit gesture marked a reconciling seek as owed, and an owed seek kept the transport ticking every frame for the whole drag: timing reads, a full clip-manifest post every 20 frames that Studio rebuilds its clip list from, and media rebinds every 30. Nothing is owed until the gesture marker clears, and the gesture watch already wakes the loop at that moment, so the loop now parks mid-gesture. * docs(core): keep the park comment to one line * fix(core): releasing a paused-media lease wakes the parked loop to stop that media Release only dropped the lease, so a parked transport kept letting the released element play until an unrelated wake. The lease test passed only because it started the media again after release, which fires a play event. |
||
|
|
660674f469 |
fix(core): torn-down runtimes stop checking readiness, and entry tests fit their timeout under load (#4960)
* test(core): load the runtime once per file so the entry tests' first timeout covers only its own work * fix(core): a torn-down runtime's pending readiness check no longer touches the next document |
||
|
|
b7343e3a95 |
fix(core): a seek onto a tween's start shows that tween, not an earlier tween's end (#4942)
* fix(core): a seek onto a tween's start shows that tween, not the earlier one's end
The seek re-render stepped to just below the target and back. A child
starting exactly at the target sits at local time 0 both before and after
that step, so GSAP skips it going forward and an earlier tween on the same
property keeps the frame (fromto edits at the playhead read the from()
end, 35-50 px off). One forced silent render at the target walks every
child forward in authored order instead, so same-time steps still apply in
order.
* style(core): format the seek re-render change
* fix(core): re-render a seek from just above too, not with a forced render
A forced render at the seek time redrew every tween GSAP had ever rendered,
including ones that start later, at their recorded start values: after a
seek past the end, a later tween's start showed early (style-5-prod,
hdr-regression). The re-render now steps silently just above the target,
then just below, then to it. The step up makes a child that starts exactly
at the target cross its start on the way down, so it renders; tweens that
have not started are left as the seek put them, and the last move is still
forward, so same-time steps keep their authored order.
* fix(core): re-cross only the tweens that start at the seek time
The step up past the target (
|
||
|
|
afe020ae59 |
fix(core): a GSAP call added after the first seek fires once, not twice (#4948)
The seek path skips its silent re-render on timelines with a zero-duration callback, because that re-render re-arms the callback and the next forward seek fires it again. The answer was cached per timeline on the first seek, so a tl.call added later was never seen: the re-render ran and the call fired twice. The check now reads the timeline's current children on every seek. |
||
|
|
b3c5207827 |
fix(core): music keeps playing smoothly across video cuts in preview (#4939)
* fix(core): music keeps playing smoothly across video cuts in preview While no Web Audio buffer plays, the preview playhead follows an audio element. It followed the first one in page order, so a sub-composition whose shots each carry a short sound clip took the playhead away from the music bed. At every cut the next shot's sound starts late, the playhead waited for it, the music played on, and media sync then pulled the music back: a jump at each cut. The followed clip still keeps the playhead; otherwise the in-window clip that runs longest takes it. * refactor(core): check the followed clip first and drop the clock pick's flag * fix(core): an ended clip never leads the playhead, and the followed clip keeps it A bed whose file ends before its authored length no longer wins the pick and leaves the playhead on wall time. Pins the rule that a longer clip starting late cannot take the playhead from the followed one. |
||
|
|
02775c716f |
fix(core): render GSAP set steps on the frame they land on (#4911)
* fix(core): render tl.set steps on the frame they land on The runtime re-rendered a seek by stepping just past the target and back. Arriving backwards, GSAP applies same-time zero-duration steps in reverse, so a film that hides every frame then shows one, on its frame grid, lost that layer on every step: in renders, previews and thumbnails. It also fired a tl.call on the target time again on each repeated seek. Both seek paths now re-render from just below the target, silently. * test(core): expect the seek re-render to arrive from below * test(core): pin the seek re-render from below in the runtime seek script * fix(core): keep re-rendering a seek to 0 from above * test(producer): rebase style-4-prod on caption frames that render forward |
||
|
|
8aefd91bf8 |
fix(cli): capture snapshot --at at the exact requested instant (#4827)
snapshot --at captures the frame at the exact requested instant instead of the nearest seek step. |
||
|
|
9d6ca45857 |
fix: unbreak the regression suite on Windows (PSNR filtergraph escaping + console window popups) (#3839)
* fix: hide console windows spawned by ffmpeg and nvidia-smi on Windows Node's `windowsHide` defaults to false, so every child process that is a console application pops a window on the user's desktop. During a render or a regression run that is a stream of black windows stealing focus. The repo already sets `windowsHide: true` across cli, studio-server and most of engine; these were the remaining gaps, all on paths that run during a normal render: - core/mediaGradeAnalyzer: ffprobe + ffmpeg, once per analyzed media file - engine/browserManager: `nvidia-smi` VRAM probe. This one goes through a shell (`execSync`), so it flashes a cmd.exe window even on machines with no NVIDIA GPU, where the command exists only to fail - producer: the regression harness ffmpeg runner, PSNR/audio comparison helpers, fixture synthesis, and the ffprobe call in audioPadTrim No behavior change on POSIX, where the flag is ignored. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(producer): escape PSNR stats_file for ffmpeg's two-pass filtergraph parse An ffmpeg filtergraph argument is unescaped twice: once when the graph is split into filters and their options, then again when the option value is read. `psnrAtFrames` escaped `\` and `:` a single time, which only survives the first pass. On POSIX that is invisible, because mkdtemp under tmpdir() produces neither character. On Windows the stats path is always `C:\Users\...`, so it reaches the option parser with a bare `:`, which starts a new option and fails the whole graph: [AVFilterGraph] No option name near '\Users\...\psnr.log' Error parsing filterchain '[rv][gv]psnr=...:stats_file=C\:\Users\...' Every suite that got as far as quality validation died there, so a Windows regression run reported 0 passes with only 2 genuine compilation failures. Escaping for both passes fixes it and stays a no-op on POSIX. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(producer): pin PSNR stats path escaping with a colon and backslash path * fix(producer): keep the PSNR stats path out of the filtergraph --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Miguel Ángel <miguel.sierra@heygen.com> |
||
|
|
45b8e171e2 |
feat(studio): sync origin, out-of-sync repair, linked selection toggle and grouped clip menu (7/8) (#4820)
* feat(studio): order the clip menu into time, sound, picture and delete groups Split and Freeze frame; Normalize, Voice, link items and Duck; Look and Crop; then Delete beside Delete this clip only. Each item file renders its pieces separately, empty groups collapse, and the viewport clamp uses the measured menu height instead of a row-count estimate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): mint freeze-frame right-half links with the shared lk-N helper Freeze frame now calls core relinkSplitHalves, so split halves and freeze halves share one link-id convention instead of L -> L-2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): apply speed edits to every data-link member in one undo step The inspector speed slider, rate lane edits and ramp presets on a linked clip now commit once, writing the selection and, via expandToLinkedMembers, each partner from its own current value. Unlinked clips keep their usual path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(studio): drop the audio parent tick in favour of the data-link chain badge A linked clip now shows one link indicator: the chain badge driven by data-link. The waveform no longer draws its 1px parent tick. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): follow late clip-menu rows and target link partners like S2 The menu height follows a ResizeObserver so rows that read the live preview after mount still clamp inside the viewport. Speed fan-out builds partner targets with buildPatchTarget, matching the link edit plan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): show the sound strip and audio menu items without studio's shell The audible-video waveform strip drops AudioWaveform's 16px label band, which left a 0px canvas on short lanes. Normalize loudness and Duck under voice fall back to the timeline session's project, the live preview iframe store and a new onNotice edit callback when no StudioShellProvider is mounted. usePreviewIframeStore is exported so a host can publish its preview. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): show duck under voice only when a voice overlaps The item now appears only when an overlapping voice exists or the bed is already ducked. Its check mark moves to the right edge so unchecked rows align with siblings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): name the partner in the clip menu link and unlink items Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): clip menu stops offering unlink once the clips are unlinked The timeline skipped store updates when only data-link changed, so the menu kept reading the stale link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(core): sync origin, offset math and move/slip into sync for linked pairs data-sync-origin survives Unlink; split gives right halves a fresh origin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): split re-mints the sync origin of unlinked pairs too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): detach, link and keep-sound cutout write a sync origin that unlink keeps TimelineElement.syncOrigin is read on both parse paths; merge back drops it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(studio): expect sync-origin on keep-sound cutout write Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): linked selection toggle in the timeline toolbar, on by default Off: a click selects one clip; drag, trim, razor, speed and delete stay on it (delete unlinks the survivor). Alt-click still selects one half when on. Right-click holds the out-of-sync indicator preference. Both persist in UI prefs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): link groups share a label colour; out-of-sync badges with move and slip Red badge on both halves of a sync-origin pair that drifted (frames, s:ff past a second); hidden when rates differ or the preference is off. The whole badge opens Move / Slip into Sync; each edits that clip alone in one undo step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): take link label colours from theme tokens Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(sdk): syncOffset, moveIntoSync and slipIntoSync for sync-origin pairs Core gains findSyncPartner, the DOM pairing shared by the SDK and the CLI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): timeline rows report syncOffsetFrames and print out-of-sync Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(cli): the timeline row fixture carries syncOffsetFrames Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(skills): data-sync-origin in hyperframes-core Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(core,sdk): keep a one-sided cut's sync origin and slip the in-point playback reads relinkSplitHalves reminted the right half's sync origin even when only one member of an unlinked source pair was cut, so the uncut partner kept the old origin and the new half lost its badge. The origin is now reminted only when both the video and the audio were cut. Slip into Sync wrote data-media-start whenever it existed, but playback reads data-playback-start first, so a clip carrying both never moved. The link timing reader now uses playback's precedence and the slip writes the attribute that wins; lint compares the same field. A sync partner is also looked up only in the clip's own composition (core) or source file (Studio). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): flip the out-of-sync menu above the pointer near the bottom edge Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: trim comments the sync-origin layer added Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(core): split the scoped candidate lookup out of findSyncPartner Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(core,studio): find sync partners inside the link scope findSyncPartner and Studio's syncPartnerOf now scope by the same rule as link groups: the nearest data-composition-id or data-composition-file ancestor, plus the row's compositionScope in Studio. An origin reused in a file host or an inline composition no longer pairs across it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
0559be0b13 |
feat(studio): link a video and its audio with data-link (6/8) (#4818)
* feat(core): add data-link media link helpers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(lint): warn on out-of-sync and orphaned linked clips Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): select, drag and trim linked clips together Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): detach, merge, link and unlink source transforms Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): link-aware split, delete, alt-edit unlink and link edit actions Split and delete fan out to link partners. Alt drag/trim edits one member and unlinks it. onLinkEdit runs unlink, link, detach and merge as one undo step each. Single-clip timing edits of a linked clip skip the SDK path so its linked default cannot move the partner behind the store. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio-server): give split right halves of a linked pair their own link Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): clip menu detach, unlink, link, merge back and delete-one items Items live in clipMenuLinkItems.tsx with a one-line hook in ClipContextMenu; the same resolver drives the Cmd+L, Opt+Shift+D and Opt+Delete shortcuts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(sdk): setTiming applies to data-link partners by default { linked: false } edits one member and unlinks it, matching Studio's Alt-edit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(skills): document data-link linked clips in hyperframes-core Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(studio): keep comment share at or below base in link plumbing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(studio): audio pill link follows data-link, not a shared file name Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): alt-click selects one linked member even inside the pair selection Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(lint): drop the rule-list comment for the linked clip rules Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(sdk,lint): keep a link group inside its own composition Link ids are minted per file, so lk-1 is normal in the root and in a child composition. The SDK's linked-timing query descended into nested hosts and addressed every match with the initiating scope, so moving a root clip moved the child's pair too; lint grouped them into one drifting group. Both now group only members of the same composition scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): match linked media by full asset path, scope links, keep hidden sound silent Merge and Link compared only a lowercased basename, so assets/one/talk.mp4 and assets/two/talk.mp4 enabled a destructive Merge. Clips now compare the src resolved against each clip's own source file, and Merge re-checks the two srcs in the source before it runs. Link membership in the timeline (linked members, gesture expansion, unlink orphans) is scoped to a source file. Detach and the keep-sound cutout carry a hidden video's data-hidden to its audio, and Merge refuses when only one member is hidden. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(studio): move the timeline move-edits handler into its adapter App.tsx sat at 600 lines on this layer and 602 once merged with main. useTimelineMoveEditsHandler now lives beside persistTimelineMoveEditsAtomically, same callback and dependencies, bringing App.tsx to 592. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(sdk,studio,lint): keep link groups inside inline compositions A link group now stays inside the nearest data-composition-id or data-composition-file ancestor. The SDK used to recognise only file hosts, and Studio compared only sourceFile, so an inline child composition that reused a link id was edited together with the root group. core/media-link linkScopeOf is the shared rule for the SDK and Studio. Lint cannot import core, so it uses the same two attributes directly. Studio rows record their compositionScope, and link and merge refuse pairs that cross it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(sdk): refuse a link edit whose partner address names another clip A partner addressed in the caller's scope can resolve to a different element when an inline composition reuses a root clip's data-hf-id. setTiming now checks that each partner's address resolves back to that partner and throws before mutating when it does not, instead of editing the root clip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): a remote media url keeps its query when matching an asset Two different videos at one remote path with different queries were treated as the same file, so Merge could delete the audio and use the wrong video's sound. Project-local srcs still drop query and hash. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(studio): keep a remote url's query exactly as written when matching assets Decoding the whole url folded %26 into & so two different media urls matched. Decode only the path; the query is compared as authored. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(studio): compare a remote url as serialized, decode only local paths A remote pathname with an encoded reserved character (%3F) matched the same path with a literal ?, though they can return different media. Remote urls keep origin, path and query exactly; local srcs are still decoded and stripped of query and hash. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
824e4100c6 |
feat(studio): waveform strip, clip light, peak marks and video beat source (5/8) (#4817)
* feat(studio): draw a waveform strip under video clips that carry sound An audible video keeps its thumbnails and gains the audio waveform along the bottom 38% of the clip (also when thumbnails are off); muted and silent video are unchanged. The waveform route already decodes video audio; a test now proves it on an mp4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): latch a CLIP light on the master meter at the export ceiling The light turns red when the preview master sample peak reaches -1 dBFS (the export true-peak ceiling) and stays lit until clicked. Mutation-tested threshold and latch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): paint the CLIP light from theme colour tokens Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): mark where each clip redlines on its waveform studio-server computes an absolute per-50ms sample-peak map once per media file (native channels, cached by size+mtime next to the waveform cache); the timeline paints red marks where the source at the clip's own volume reaches -1 dBFS and names the loudest point. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): let a video with sound be the beat source Studio's isMusicSourceElement accepts an audible, unmuted video for the music track and the beat fallback (lane zoning unchanged); core findMusicAudioSrc accepts <video data-has-audio="true"> without muted; the beats CLI message mentions video. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): decode each peak map once and never offer Duck on a carve source Concurrent peak requests for one file share a single ffmpeg decode; Duck under voice is withheld on a clip another bed already carves against. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): decode the same audio stream the peak map probes The channel probe read stream a:0 while the decode left stream choice to ffmpeg, which picks a later stereo stream over a mono first one; every frame was then read at the wrong width, doubling the bins and taking the other stream's level. Both commands now select a:0, and the cache key moves to peaks-v2 so maps built from the wrong stream are rebuilt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): terminate the peak map's ffprobe options before the input Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): reject a peak map whose decode exits nonzero A decode that emits some samples and then fails no longer resolves as a complete map, so /peaks cannot cache a truncated clipping map. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
000ccd426a |
feat(studio): speed presets, voice, look, crop presets and freeze frame in the clip menu (3/8) (#4815)
* feat(core): add gentle ramp-in, ramp-out and slow-mo-middle speed presets Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): add voice, look and crop clip-menu items and clip badges Voice and Look are single-choice submenus writing data-fx-chain and data-color-grading; None clears. Crop opens the canvas crop preset bar. ClipBadges reads the live preview node and follows attribute edits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): drop the unstyled badge classes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): add crop aspect presets to the canvas crop handles Free, 16:9, 9:16, 1:1, 4:5, Reset and Done float above the clip opened from the clip menu. Presets commit a centred inset clip-path; Reset removes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(studio): read the committed crop from the inline clip-path Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio-server): add freeze-frame file mutation Extracts the frame under the playhead with ffmpeg (media time honours data-media-start, playback rate and a rate lane) into assets/freeze/, then in one write splits the video, inserts a 2 s <img> still with the video's box styles, shifts the rest of the track and splits a data-link partner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): import replaceFileAtomically from core atomic-file Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): add freeze frame to the clip menu Freeze frame on a video under the playhead posts the studio-server freeze-frame mutation and records its before/after as one undo step. onFreezeFrame is threaded through the timeline edit callbacks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): keep the freeze still inside assets/freeze The clip id from the project HTML went straight into ffmpeg's -y output path, so an id with ../ segments wrote outside the project. The id is now reduced to one safe filename component, the output is pinned inside assets/freeze before extraction, and the still's src is built from that name rather than from a filesystem path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): give every freeze still its own immutable name Two clip ids that sanitise alike (a.b / a_b), ids sharing an 80-character prefix, or a second freeze of one clip at the same playhead all produced the same still path, and ffmpeg's -y replaced the first still's pixels. The name now carries a hash of the raw id and a per-extraction token, the route refuses a name that already exists, and ffmpeg runs with -n so it can never overwrite. The freeze media time reads data-playback-start before data-media-start, as playback does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3c299acc7f |
feat(core): audible videos in preview web audio, audio groups, meters and carve (2/8) (#4814)
* feat(core): add isAudibleVideoElement predicate and audible media selector Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(runtime): route processed audible videos through web audio in preview An audible <video> joins the Web Audio schedule, hidden-toggle and group-capture passes when it needs a gain el.volume cannot express: a boost above unity, an fx chain, automation, or an audio group. A plain audible video at unity stays on native output. The clock master stays audio-only; a video whose capture fails stays on native output (never decoded, never failed closed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(audio): let audible videos join audio groups in preview and render resolveAudioGroups, audioGroupOf, group render ids, the engine mixer and the audio_group_no_members lint rule accept an audible <video>. A hidden group drops its video members from the mix; muted videos stay inert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(editing): offer the audio fx section on audible videos EditableElementFacts gains hasAudio; studio and sdk derive it from muted and data-has-audio. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): show audio meters when a project has an audible video Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): offer audible videos as carve voices Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(studio): let audible video clips join audio groups Drops the video refusal; grouping and group audition count audible videos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(engine): honor hidden audio groups for auto-detected video audio Muted videos that declare data-has-audio are no longer mixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): keep authored src, loop and honest status when keeping cutout sound Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(core): treat only data-has-audio=true as audible in runtime and lint Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(core): trim the web audio route and group-key comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(runtime): capture ramped clips so a group's bus carries them in preview A rate lane skipped Web Audio entirely, so a ramped video or audio clip in a group played native output without the group's fader, mute or FX while the export applied them. Only the decoded-buffer fallback cannot follow a rate curve; the media-element capture can, so the skip now guards that fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): show meters only for videos Web Audio carries A plain audible video at unity stays on native output, which the meters cannot read, so it no longer advertises them. The runtime's join rule and the meter gate now share audibleVideoNeedsWebAudio (core/audible-video). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
30c55694cb | fix(studio): a first animation in a sub-composition file runs from inside its template (#4806) | ||
|
|
78e849235a |
fix(core): a composition made only of a set shows it at a seek in the preview (#4865)
* fix(core): a composition made only of a set shows it at a seek in the preview * chore(core): keep the comment share of the runtime init file level * test(studio): bank the four resize-hold rows the preview now gets right |
||
|
|
c72b735a8c |
fix: a save's temp file no longer reaches Studio as an outside change (#4857)
* fix: a save's temp file no longer reaches Studio as an outside change * refactor: the project file walk and its tests carry no new duplication or complexity * test(studio): the edit accuracy gate judges the two nudge sequences again |
||
|
|
7b0ec69704 |
fix(core): pair a staged scene copy's video with its own render frame (#4791)
Page-side shader transitions clone the outgoing and incoming scenes, ids included, into staging layers. Color grading grades the copied <video> too, and findInjectedRenderFrame looked its frame up with getElementById, which returns the live scene's <img>. The live and the copied grading entries then both kept their canvas right after that one <img>, moving each other on every mutation, and the loop blocked the page: a graded <video> inside a transition stopped the render at the transition's first frame. Look through the element's following siblings first, where the injector puts the frame, and fall back to the id lookup only when it isn't there. |
||
|
|
567525a8c2 |
fix: readers never see an empty or half-written project file (#4777)
* fix: readers never see an empty or half-written project file * test: pin the create routes and block install to whole-file writes * fix(sdk): a write through a link to a missing file creates that file * fix: saves through a linked folder reach the real file, atomic writes handle long names * test(sdk): check for the stray file, not the folder listing * fix(core): creates work on Windows FAT drives, and links through folders resolve as the system does * fix: agree the helper move in the deletion check, and match temp paths without a path regex * test: check POSIX file modes only off Windows |
||
|
|
7734697872 |
fix(studio): a copied clip keeps its look and motion, and a duplicated section keeps its name (#4756)
* fix(studio): a copied clip keeps its look and motion, and a duplicated section keeps its name * fix(studio): a copy's tweens start where their originals do and stay in the timeline's scope * fix(studio): a copy takes only tweens it can place exactly, and never moves the film's own * fix(studio): a copy leaves out a tween that sits inside a callback or a guard * fix(studio): a copy leaves out a set that runs only inside an if or an else * chore(studio): keep the copy change under the comment ratchet |
||
|
|
2fc5a37fce |
fix(core): a video's sound plays at its boosted volume in the preview (#4746)
* fix(core): a video's sound plays at its boosted volume in the preview A <video> with data-volume above 1 now plays through the same Web Audio gain as <audio>, so the preview matches the export. Videos at or below 1 keep their native output. * style(core): keep the runtime's comment share at its base * fix(core): a boosted video hidden after its volume drops goes silent |
||
|
|
bd873ec35c |
fix(core): namespace SVG ids during composition inline to prevent cross-scene collisions (#3494)
* fix(core): namespace SVG ids during composition inline to prevent cross-scene collisions Two nested compositions that each declare their own SVG ids (`<clipPath id="clip">`, `<symbol id="shape">`, `<filter id="fx">`) are legal per file and pass `hyperframes check`, but collide once both are inlined into one render/preview document. `url(#id)` funcrefs (`clip-path`, `filter`, `mask`, `fill`, `stroke`, `marker-start/mid/end`) and fragment `href`/`xlink:href` refs (`<use href="#id">`) are resolved by the browser's native SVG/CSS engine, which always binds to the first matching id in document order — so the later scene either clips to nothing or paints the earlier scene's content. `getElementById` was already scoped per composition in #646, and media pipeline ids got a parallel `data-hf-render-id` attribute in #3340. Neither covers this: native `url(#id)`/`href="#id"` resolution can't be intercepted by a JS proxy, so the `id` attribute itself has to become document-unique. Add `svgIdNamespacing.ts`: during `inlineSubCompositions`, every id declared on an `<svg>`-subtree element is prefixed with the composition's document-unique runtime id, and every same-document reference to it — DOM attributes (`href`, `xlink:href`, any `url(#id)` value including inside `style`) and the composition's own extracted `<style>` text (both `#id` selectors and `url(#id)` declaration values) — is rewritten to match. Renamed elements keep their original id on `data-hf-authored-id`, the same attribute #646 already added for the composition root, so an inline script's own `document.getElementById(originalId)` keeps resolving via the existing `__hfGetElementById` scoping shim. Extract `selectorIdTokens.ts` from `compositionScoping.ts`'s existing single-id selector scan so the new many-id rewrite reuses the same guarded-region logic instead of a second copy. Closes #3490 Co-Authored-By: Miga <noreply@anthropic.com> * fix(core): only namespace SVG ids that have native url/href references SVG ids referenced exclusively by JavaScript (e.g. GSAP's `tl.to("#cut-1")`) must not be renamed — global libraries access `document` directly and bypass the composition-scoped querySelector Proxy, so renamed ids break animation targeting. Now namespaceSvgIds pre-scans for url(#id) funcrefs and href="#id" fragment refs (both attribute values and <style> text content) and only renames ids that appear in at least one native reference. Ids with no native reference (only used by JS) keep their original names. Fixes style-17-prod regression where GSAP selectors targeted #cut-1/#tear-path-1 etc. which were unreachable after rename. Co-Authored-By: miga-heygen <miguel.sierra_miga@heygen.com> * fix(core): decode CSS identifier escapes when rewriting id selectors `replaceSelectorIdTokens` compared the raw text after `#` against the candidate ids, so an escaped selector such as `#fx\.1` never matched the element whose id attribute is `fx.1`, and callers spliced in unescaped replacements that were invalid CSS for ids containing `.`, `:` or a leading digit. The scanner now reads the token as a CSS identifier per CSS Syntax Level 3 (`\.`-style and `\HEX `-style escapes, U+FFFD for out-of-range code points) before comparing, and exports a spec-faithful `escapeCssIdentifier` (the `CSS.escape` algorithm) for emitting replacements. Consuming the whole identifier also makes the token boundary check exact for non-ASCII and escaped name characters. Also removes the ambiguous `[^\]]` branch from the guarded-segment regex so a bracket body cannot match both the quoted and bare alternatives (flagged as potential exponential backtracking). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(core): rename only colliding SVG ids and keep authored selectors resolving Renaming every natively referenced SVG id broke author code even in a single composition: with `<path id="shape"/><use href="#shape"/>`, `svg.querySelector("#shape")` returned null because the id had been prefixed although nothing collided. The getElementById shim did not cover Element selector APIs or GSAP selector arrays, and escaped stylesheet selectors (`#fx\.1` for `id="fx.1"`) stopped matching after the rename. Namespacing now runs once per assembled document, after every instance is inlined, and is collision-driven: an id is renamed only when the merged document would otherwise carry it more than once. One colliding element keeps the authored id - the first in document order that cannot be renamed (top-level document content, or a JS-only id), else the first in document order - so native `url(#id)`/`href="#id"` resolution keeps binding to it, and every other renamable duplicate gets a document-unique id with its references rewritten. Ids that never collide, including every single-composition project, are byte-for-byte unchanged. The demand-driven gate is kept: JS-only ids are never renamed, and the residual cross-instance collision for that class is documented in `collectNativelyReferencedIds`. Nested hosts are excluded from their parent's scope, minted ids are checked against every id in the document, and an existing data-hf-authored-id is never overwritten. The composition script runtime keeps `#authoredId` selectors resolving for renamed elements by rewriting the token to `:is(#authoredId, [data-hf-authored-id="authoredId"])` - a superset, so the same selector still matches an untouched instance: - scoped `document.querySelector/querySelectorAll` and the GSAP proxy (`gsap.to`, `timeline.to`, `gsap.utils.toArray/selector`); - GSAP array targets, whose string entries now resolve through the same scoped lookup instead of the global document; - `Element.prototype.querySelector/querySelectorAll`, patched once per document and only when at least one id was actually renamed, so a document without collisions runs untouched natives. The renamed-id set is discovered from `[data-hf-authored-id][id]` in the compiled DOM, so no extra plumbing between compiler and runtime is needed. `Document.prototype` is deliberately left alone: an unscoped document-wide lookup by a third-party library cannot know which instance it means and resolves to the first in document order, exactly as before. `matches`/`closest` and selectors built at runtime with hex escapes are likewise outside the shim. Stylesheet rewriting matches ids through CSS identifier escapes and emits escaped replacements, so `#fx\.1 { ... }` becomes `#scene-b--fx\.1 { ... }` and `url(#fx.1)` becomes `url(#scene-b--fx.1)`. Tests: unit coverage for the collision/keeper rules, exclusion, id minting, escaped selectors and hex escapes; end-to-end regressions that execute the compiled scoped scripts in a real DOM for (i) a single composition with native and script references to the same element, (ii) two colliding compositions where native refs and every script lookup form resolve to their own element, and (iii) an escaped id that is styled and natively referenced keeping its rule after rename. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * test(core): stop importing htmlBundler from the inline sub-composition suite `inlineSubCompositions.test.ts` imported `assignBundledRuntimeCompositionIds` from `./htmlBundler` only to give duplicate hosts distinct runtime ids. `htmlBundler.ts` statically imports esbuild, and esbuild refuses to load inside a jsdom test realm on Windows ("new TextEncoder().encode('') instanceof Uint8Array is incorrectly false"), which made the whole suite fail to load in the Windows test job while every other suite passed. The test now carries a small local mirror of the bundler's assignment (`<id>__hf<n>` for hosts whose authored id repeats), so the suite has no esbuild dependency. Test behaviour is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Miguel Ángel <miguel.sierra@heygen.com> Co-authored-by: Miga <noreply@anthropic.com> Co-authored-by: James <james.russo@heygen.com> |
||
|
|
5a77dbcea1 |
perf(core): the preview loads only the media near the playhead (#4682)
* perf(core): the preview loads only the media on screen or due next
Studios preview bound every timed video and audio at preload=auto and called
* perf(core): a far clip in the preview stays unloaded until it comes due
A trimmed clip outside the window now waits at preload=none, reloaded so a fetch
the parser started stops too; at metadata, 60 clips' header reads still queued
on the origin under a slow link. An untrimmed clip keeps metadata, since its
window is read from the element's duration.
* fix(core): a far preview clip makes no request before it comes due
Chromium keeps fetching a clip once it has started, whatever preload says after,
so the reload at preload=none from the bind only restarted the fetch. In Studio's
preview the runtime now sets preload=none on each trimmed clip after the first
frame as it is parsed, and reloads only a clip the window armed when it leaves.
* perf(core): a playing clip loads the next clip on its track
At 3 MB/s a cold 1080p clip needed about 3.3 s to show a frame, longer than the
2 s look-ahead, so every clip on a one-track film was still empty when it came
due. While the film plays, a clip that starts now arms the next clip on the same
track (authored track index within one composition host, read as the timeline
payload reads it), and the window pass keeps that clip armed. Paused or
scrubbing, only the look-ahead applies.
* chore(core): say in one line why the preview parses later clips at preload none
* fix(core): the Studio timeline stops waiting on clips the preview left unloaded
Studio's timeline readiness scans every media element for canplay, so each far
clip the preview deferred held it until the 8 s timeout. In a document with the
Studio preview mark, a clip the runtime has not set to buffer now counts only
if it is on the first frame, as a lazy image already does.
* fix(core): a clip leaving the preview window closes its fetch on a slow link
Chromium keeps a fetch in flight when preload drops to none and load() runs, so
on a 3 MB/s link each played clip kept its connection and the armed next clip
queued behind them with no bytes. The release now drops src around the reload
and puts the same attribute back, which ends the fetch without a new one.
* refactor(core): name the authored-length check for what it reads
* fix(player): a clip the preview stops preloading drops its parent-frame copy
The player adopts each iframe clip whose preload turns auto into a parent-frame
proxy that fetches the whole file, but never let go when the runtime set the
clip back to none. On a 3 MB/s link those proxies and the thumbnail reads held
all six connections, so the armed next clip got no bytes. A demoted clip now
releases its proxy through the same path a removed clip uses.
* chore(player): keep the proxy adoption note in one place
* perf(studio): pause timeline thumbnails while playing preview media waits
A playing preview clip that fires waiting now holds every thumbnail job and
aborts the ones in flight until the transport stops; they re-run afterwards.
An aborted job frees its slot at once, and a filmstrip decode closes its
range requests on abort.
* Revert "perf(studio): pause timeline thumbnails while playing preview media waits"
This reverts commit
|
||
|
|
c5a69727ff |
fix(core): bundling and rendering keep print-only, titled and non-CSS styles conditional (#4664)
* fix(core): keep print-only and non-CSS head styles apart when bundling * fix(core): inline each linked stylesheet where its link was, keeping its media * fix(core): merge a titled head style only with styles of the same title A style with a non-empty title belongs to a style sheet set; the browser enables only the preferred set, so merging it into an untitled (persistent) style or one with another title changes what applies. An empty title is persistent, like no title; titles compare case-sensitively. An inlined linked sheet carries its link's title. The merge key returns undefined for a non-CSS type (never merged or inlined) and treats media="all" as no media, as the browser does. * fix(core): leave a disabled stylesheet link as a link instead of inlining it * fix(producer): render keeps conditional head styles apart, as the preview does * test(core): pin case and padding in head style merge keys, drop a subsumed case * fix(core): keep a composition style's media, and leave its non-CSS styles out of CSS * fix(core): emit a conditional composition style as its own element, keeping media and title * test(core): make the non-CSS composition style fixture able to fail * fix(core): a composition's link keeps its own media and title when another links the same file Hoisted composition links are deduped on href, rel, condition, type and disabled rather than href alone, in the bundle, the render and the live mount, and keep their type and disabled state. * fix(core): the bundle keeps a font's only applied copy when an alternate style repeats it The font dedupe asks cssStyleMergeKey whether a style always applies, so a titled style no longer counts as always applied. * fix(core): the bundle inlines a linked sheet whose type names a charset Chrome applies <link type="text/css; charset=utf-8">, so a link's type is read by its MIME essence; a style's type still has to be exactly text/css. Adds a test for a template with no matching root and a non-CSS style. * style(core): drop a comment the constant's name already says * fix(core): hoisted links dedupe on CORS mode, integrity and referrer policy, not noscript copies One helper, hasSameLink, decides whether a hoisted link duplicates a live one, for the bundle, the render and the mount. inlineSubCompositions no longer dedupes its result on its own. Tests cover rel, disabled, non-CSS type, CORS, integrity, referrer policy and a root noscript link. * fix(core): a root link and a composition's same link differing only in fetch attributes ship once The link key goes back to href, rel, condition and disabled; crossorigin, integrity and referrerpolicy are not compared, so a root snippet repeated in a composition is emitted once and the root's override styles keep their order. |
||
|
|
3dc3a9ca1a |
fix(studio): clips inside nested compositions sit at their master time (#4681)
* fix(studio): clips inside nested compositions sit at their master time * fix(studio): nested clip starts read authored scene lengths as the runtime does * test(studio): drop a reference-start case the DOM fallback never reads * test(studio): a clip inside a referenced scene sits after its authored length * fix(studio): drag and trim a nested clip to where it is drawn * fix(studio): keep a root-time nested video's drag in master time * fix(studio): duplicate and keyframe edits on a nested clip use its own clock * fix(studio): nested clip drops stop at the host start and trims scale on its clock * fix(studio): a nested clip's head trim stops at its host's start * fix(studio): a dropped nested clip stops at its host's start before snapping |
||
|
|
e25bc3a806 |
fix(media-use): record agent-made voice, music and sound effects in the media manifest (#4648)
* fix(media-use): record agent-made voice, music and sound effects in the project's media manifest * fix(media-use): record in place only when --source says the agent made the file * test(media-use): a rewritten agent file keeps one manifest record * fix(media-use): leave a person's own sound effect unlabelled and mark locally made music generated * refactor(media-use): record agent audio in-process through the shared manifest library * style(media-use): format the in-process recording and refresh the skills manifest * chore(skills): refresh the skills manifest for the media-use changes * fix(media-use): report a broken ffprobe setting plainly and document the project sfx source * style(skills): format the pipeline manifest assertion * chore(skills): refresh the skills manifest * fix(media-use): a regenerated file gets a fresh record, and lookups skip the replaced one * test(media-use): a replaced record no longer answers a prompt lookup in the CLI * chore(skills): refresh the skills manifest * chore(skills): refresh the skills manifest from a clean tree * fix(media-use): never give a recorded file the id of a download in flight * chore(skills): refresh the media-use manifest hash * fix(media-use): list only a file's newest record in candidates and the media index * revert(media-use): leave promote as it was, nothing calls it * test(media-use): give the index test's two assets their own files * chore(skills): refresh the media-use manifest hash * fix(core): a figma import lists each media file once, like media-use |
||
|
|
840f657028 |
feat(player): play and loop a range of a film with range-start and range-end (#4688)
* feat(player): play and loop a range of the film with range-start and range-end The runtime takes a set-play-range control and stops on the range end frame itself. The player wraps to range-start with loop, fires ended without it, and reports a range cut to the film with rangeclamped. Video and __timelines players check it per tick. * fix(player): hold a range on its last frame and let the runtime own range jumps A runtime with the play-range capability jumps to range-start itself when a new range leaves the playhead outside, so a stale state no longer ends the film; older runtimes keep the player fallback, guarded until a state lands inside. Every range stop shows the last frame before range-end; a paused playhead re-parks only when it falls outside the new range. * fix(player): stop a range a check early and enforce its end on a video in a background tab * test(player): share the range video setup * fix(player): a slow frame no longer cuts a range short; a video without a range is unchanged * fix(player): a range still stops early where video time moves once per frame * refactor(player): cut the range look-ahead comment to one line * fix(player): a per-frame video time rounded down still stops a range early * test(player): pin no rounding tolerance at a film's own end * test(studio): expect the play-range capability on control messages |
||
|
|
e0b940aa30 |
fix(core): a sound effect starts on its time instead of a frame late (#4696)
* fix(core): a sound effect starts on its time instead of a frame late * style(core): format the early-start change * test(core): a clip past its end is never started early * fix(core): a seek stops a clip started early, and the lead never passes 40 ms of real time * test(core): drive the early-start tests the way the runtime receives a seek and a speed * fix(core): the early-start lead never passes 40 ms of film time at fast speeds * fix(core): keep a sped-up sound effect inside strict sync when it starts early * test(core): pin the early-start cap at fast speed |
||
|
|
fdbc5dcaf7 |
fix(core): the playhead no longer jumps back when an audio clip starts (#4679)
* fix(core): the playhead no longer jumps back when an audio clip starts While no Web Audio buffer plays, the transport clock follows an audio element, and each frame it re-picked the first in-window <audio> in page order. A sound effect that started during a voice line took the clock over, and since a clip starts late (seeked, asked to play, not yet producing sound) the playhead jumped back by that delay, 30 to 450 ms in real films, dragging every other track with it. The followed clip now keeps the clock while it plays. And audio may pull the playhead forward or hold it while it catches up (starting, seeking, buffering), but never push it back; a jump back past a hard sync, such as a native loop wrap, is ignored. The clock never runs ahead of its source, so media sync never chases it. Also: a playing element with a media error no longer leads the clock, and a speed change sets the clock's rate before the elements'. * style(core): trim the handover fix's comments to what the code cannot say * style(core): name the clock's no-rewind rule instead of commenting it * style(core): format the clock * test(core): pin the clock's hold while seeking and its skip of a failed clip * fix(core): the playhead keeps its place on a speed change, a short loop or a failed clip * fix(core): a late looping bed holds the playhead, and a clip with no source never leads it * refactor(core): split the clock's behind-the-playhead rule into its own method * fix(core): an audio clip with no source never leads or freezes the playhead |
||
|
|
cbcadbfbd0 |
fix(studio-server): uncopied HEVC clips no longer stall Studio while their preview copies are made (#4580)
* fix(studio-server): a cold proxy copy answers 202 at once and the preview retries until it lands * fix(studio): timeline filmstrips wait for a clip's proxy copy instead of failing on the 202 * fix(studio-server): a copy that cannot be made reports its failure instead of answering 202 forever * test(studio-server): pin that a full queue is not remembered and a reset probe stops waiting * test(studio-server): pin that a failure outside ffmpeg is remembered too * style(studio-server): keep comment share at base in the transcoder and decoder * fix(core): a clip's proxy URL goes on the video only once the copy is served, so every reader of it works * fix(player): the parent media mirror follows a clip's src, so it plays the preview copy once it lands * perf(player): the mirror re-points a clip only when the parent takes over playback * style(core): shorten the sync-state comment in the proxy swap * fix(studio): the timeline follows a clip re-pointed at its preview copy * fix(core): a failed readiness check is retried instead of leaving a clip on its original * fix(studio-server): a composition card rendered while preview copies are made is not cached * fix(core): frame captures wait for a pending preview copy as long as for a loading video * fix(studio-server): the preview-copy check uses the shared realpath from main * fix(player): re-pointing a clip onto another clip's file no longer plays that file twice * fix(player): a clip that replaces another on the same file keeps its sound |
||
|
|
5257dd581f | fix(studio): tone-map HDR preview proxies with the render tone map (#4606) | ||
|
|
addc72d761 |
fix(studio-server): a request that fails after its project folder vanished says the folder is gone (#4617)
* fix(studio-server): a save never recreates a project folder renamed away * style(cli): wrap imports after merging main * fix(studio-server): proxy and upload answer that the project folder is gone instead of 502 or an empty 201 * test(studio-server): rename the project folder while an upload is being read * fix(studio-server): a proxy or backup answers that a vanished project folder is gone * test(studio-server): clean up the renamed folder after the proxy test * refactor(studio-server): drop an unused re-export and share the folder-gone test setup * fix(studio-server): any request failing after its project folder vanished says the folder is gone * fix(studio-server): the folder-gone answer works on every host and drops the failed route's headers * fix(studio-server): the folder-gone 404 keeps the host's own headers * fix(core): no folder outside a project is created once the project folder is gone * test(studio-server): a rename that makes the codec probe fail answers that the folder is gone * test(studio-server): a refused render leaves no outside renders folder behind * docs(core): wrap the mkdirWithinProject comment under the line limit * refactor(studio-server): let the folder-gone middleware's names carry what its comments said * fix(studio-server): say the folder is gone when a render names a composition * fix(studio-server): check renders against the folder path and share one folder-gone answer * test(studio-server): pass the project folder to the preview document store |
||
|
|
26bfd38136 |
fix(studio-server): a save never recreates a project folder renamed away (#4602)
* fix(studio-server): a save never recreates a project folder renamed away * style(cli): wrap imports after merging main * fix(studio-server): proxy and upload answer that the project folder is gone instead of 502 or an empty 201 * test(studio-server): rename the project folder while an upload is being read * fix(studio-server): a proxy or backup answers that a vanished project folder is gone * test(studio-server): clean up the renamed folder after the proxy test * refactor(studio-server): drop an unused re-export and share the folder-gone test setup * fix(core): no folder outside a project is created once the project folder is gone * test(studio-server): a refused render leaves no outside renders folder behind * docs(core): wrap the mkdirWithinProject comment under the line limit * test(studio-server): pass the project folder to the preview document store |
||
|
|
6cb95d844d |
test(core): findProjects stop tests fit Windows' time budget and pin a stopped walk ending (#4653)
* test(core): findProjects stop tests build two projects, not four hundred files * test(core): stop tests keep a folder queued at the stop, with room for Windows setup |
||
|
|
080d2c7445 |
fix(runtime): make the preview's scene swap safe before Studio turns it on (#4542)
* fix(runtime): a scene swap refuses when an animation outside the scene moves its elements * test(runtime): pin the scene swap volume re-probe, host CSS variables and diagnostics-free swap * fix(runtime): a scene swap keeps a video its scene script animates instead of reloading it * fix(runtime): a scene swap stops every animation the old scene script started * fix(runtime): record scene script animations only on pages a scene swap can act on * docs(core): reword the scene animation recording comment * fix(runtime): watch media as the page parses only on pages a scene swap can act on * perf(runtime): a scene swap checks for outside tweens in one pass over the film's tweens * test(runtime): pin the single revert and the cleared animation record of a scene swap * fix(runtime): a scene swap rebuilds media when the edit changes the scene script * fix(runtime): a scene swap undoes the sets a scene script made * fix(runtime): a scene swap rechecks outside tweens and runs new scripts after every host * test(runtime): pin that a tween started during the caption wait leaves the page untouched * fix(runtime): a scene swap refuses when its script set a value on an element the swap keeps * docs(core): say the scene recording drops a finished tween that the timeline would keep when paused * fix(runtime): a scene swap refuses when two of its animations write to an element it keeps * fix(runtime): a scene swap resets kept media and refuses animations outside the scene * fix(runtime): a scene swap keeps a moved video in place and swaps tweens on plain objects * chore(core): regenerate the inlined position-edits script for the kept-video move reapply * fix(runtime): a scene swap checks the timeline registry as it is after the caption wait * fix(runtime): a scene swap refuses when a scene changed during the wait or a revert re-registers * fix(runtime): a scene swap stops every animation a revert chain registers and rechecks its hosts * fix(runtime): a scene swap refuses a moved host or a cancelled swap and stops at a shortened end * fix(runtime): a scene swap refuses when a scene leaves its place or the film during the wait * fix(runtime): a scene swap checks only its host's place, so a later body append does not refuse it * fix(runtime): a scene swap refuses when the film's scene layout changed during the wait * fix(runtime): a scene swap refuses when the order around a scene changed during the wait * test(runtime): pin that a scene swap checks the film root order when every scene is wrapped * fix(runtime): a scene swap gives kept media the mute, rate and loop a fresh load gives it * fix(runtime): a scene swap rebuilds media a script wrote attributes on, keeping the rest * fix(runtime): a scene swap keeps media carrying the runtime classes or reordered attributes * fix(runtime): a scene swap resets a kept video's volume as a load does, not through the volume probe |
||
|
|
5df0bea8e1 |
perf(core): a bundled film inlines each shared font once instead of once per composition (#4643)
* perf(core): a bundled film inlines each font once instead of once per composition * fix(core): font dedupe keeps the last copy, so the rule the browser uses never changes * fix(core): font dedupe merges only exact copies, from styles that always apply A style postcss cannot parse ships as authored instead of failing the bundle. The key keeps !important and whitespace inside quoted family names. Styles behind a media query, a non-CSS type, <noscript> or <svg> neither lose a copy nor keep one. * perf(core): font dedupe runs before inlining, so bundling is no slower Deduping after inlining made postcss parse every inlined font: a three-scene fixture went from about 40 ms to about 450 ms. The same url text inlines to the same bytes, so deduping first gives the same output. * fix(core): a scene-part bundle keeps each scene's own font copy, so a scene still swaps alone * chore(core): shorten the font dedupe comment * chore(core): trim the font dedupe comments to keep the file's comment share |
||
|
|
4aa6b168fe |
feat(studio): a host app can reuse Studio's snapping and marquee selection in its own preview (#4635)
* feat(studio): export snapping, the marquee and picker describe for a host's own preview * fix(studio): a host pick type must bring its own marquee resolver |
||
|
|
2449ea05b1 | perf(core): light entries for safe paths, asset paths and the runtime script (#4642) | ||
|
|
5383e486bb |
fix(producer): gif renders survive rgb frames among transparent ones (#4610)
* fix(producer): gif renders survive rgb frames among transparent ones * test(producer): run the gif mixed-frame encode test in the ffmpeg lane * fix(producer): gif encode test passes the argv, reachability and comment checks * fix(producer): transparent gifs clear every frame so an opaque frame never lingers * fix(producer): only gifs that turn translucent after an opaque frame get whole cleared frames * fix(core): plain text keeps its own gif control block; gif encode failures share one shape |
||
|
|
e738e10267 |
feat(core): export findProjects to list the HyperFrames projects on a machine (#4627)
* feat(cli): hyperframes projects finds the HyperFrames projects on this machine * refactor(core): keep the project rule's comment share under its package's * fix(cli): projects keeps Spotlight hits under a symlinked root and refuses a missing root * style(cli): format the projects walker and its tests * fix(cli): projects tests pass under a symlinked temp folder and a bad root errors on stderr * test(cli): projects tests hold on Windows and cover an unreadable root * style(cli): format the projects command and tests * refactor(cli): split the projects Spotlight check and regenerate the skills manifest * refactor(core): findProjects moves to @hyperframes/core/projects so Desktop can import it * chore(core): publish the projects subpath * fix(core): findProjects fails on a root it cannot read instead of finding nothing * docs(core): name the project marker writers without naming one app * refactor(core): ship findProjects as a core export only, with no CLI command * feat(core): findProjects stops on an abort signal and defaults to the home folder * fix(core): findProjects checks an aborted signal first and stops when onProject throws |
||
|
|
4ed269ad1e |
perf(core): playback housekeeping runs on a timer, and rebinds stop re-sampling silent media (#4595)
* perf(core): playback housekeeping runs on a timer, and rebinds stop re-sampling silent media
While playing, the transport re-posted the clip manifest every 20 frames and
re-bound media every 30, frame-counted, so a 120 Hz display did both twice as
often for a film that was not changing. Playing, those jobs now run when the
composition changes (rate-limited as before) and on a one-second poll for
what nothing can push.
A rebind re-probed every media element's volume by seeking the whole timeline
60 times per second of clip, about 1,500 seeks and 50-140 ms in one frame.
The probe seeks with events suppressed, so only a tween on the element that
names volume can move it; an element no tween touches is now answered from
the tweens without seeking.
* fix(core): a data-width or data-height change applies while playing and parked
postTimeline applies the root's sizing, and it now runs when the composition
revision moves. The revision only watched timing attributes, so a size edit
waited for a pause while playing, and on main it was missed while parked
too. The observer now also watches data-width and data-height. The tick
comment is trimmed to three lines, the tick reuses its playing flag, and the
cadence test is renamed to what it checks now.
* test(core): share one 120 Hz frame step in the transport park tests
The two playing tests each defined the same frame helper; one frame120Hz
now sits beside settle and all four loops use it. No source change.
* refactor(core): drop the playing poll doc comments
The comment ratchet does not let a file's comment share rise; the reason
lives in the PR body.
* fix(core): a playing clip's track, label and z-index reach Studio again
The playing path had dropped the periodic manifest post, and the
composition observer does not see data-track-index, data-timeline-label or
an inline z-index on an existing clip (watching style would fire on every
GSAP frame). On the playing poll the runtime now builds the manifest and
posts it only when it differs from the last one posted, so an edit lands
within a second and a steady film still posts nothing.
* fix(core): keep sampling volume when a tween drives a non-DOM object
A tween on a plain-object proxy whose setter writes the element's volume
names neither the element nor volume, so the fast skip dropped it and
WebAudio-routed preview played the static data-volume (0 where the film
asks for 0.375). The skip now applies only when every tween targets DOM
nodes; any other target falls back to the full volume probe, as on main.
* fix(core): skip the volume probe again for spacers, calls and counters
The non-DOM fallback fired on any plain-object or function target, so a
tl.to({}, {duration}) spacer, a tl.call or a tweened counter brought back the
full probe on ordinary films. It now falls back only when a tweened property
resolves to a setter on the target or its prototype chain, which is what a
gain proxy or a class with a volume setter uses; data properties skip.
* fix(core): post a clip edit made while playing when playback stops
A label, track or inline z-index edited while playing and then paused before
the next one-second poll was never posted: once parked, nothing watches it.
The tick where playback stops now runs the same manifest diff once and posts
only if the manifest changed.
|
||
|
|
078c493448 |
perf: the preview loads and decodes only the images of scenes on screen or due next (#4578)
* perf(core): skip hidden clips' content so the browser stops decoding their images Hidden timed clips get content-visibility:hidden while their inline visibility is hidden, from script evaluation on. A clip due within the look-ahead (2 s by default) keeps its content live, so its images load before it shows. * perf(studio-server): load preview images lazily so hidden scenes fetch nothing * fix(core): stop the readiness scan waiting on and decoding later scenes' images * perf(studio-server): keep first-frame images eager so the preview opens as fast as before Only images inside a clip with a numeric start after 0 go lazy; a start the route cannot read stays eager. * perf(core): keep clips that start at 0 laid out before the first pass so the first frame is on time * perf(core): open the preview on time by hiding only lazy images before the first pass GSAP reads the computed style of the elements it animates while timelines build. Inside a content-skipped clip every read forces a style update, which cost about 65 ms at open on the bench composition. Before the first pass the rule now takes only lazy images out of layout, so hidden later scenes still do not load theirs; after it, the skip rule keeps their content skipped. * fix(core): hold a paused jump on the previous picture until the next scene's images decode * fix(studio): swap in a reloaded preview only after its restore seek has painted * fix(core): apply a held paused jump after 1 s when an image never decodes * fix(core): keep hidden-scene image skipping and held jumps to Studio's preview, never renders * fix(studio): reapply manual edits once a held paused jump lands * fix(studio): copy a clip without the preview's lazy-loading marks * fix(studio-server): mark preview images lazy without re-encoding the document's entities * fix(core): share one preview-mark constant between the runtime and the preview route * fix(studio): reapply manual edits a second time only after a seek that was held * refactor(core): share the hidden-ancestor walk between clip visibility and image holds * fix(core): import the studio preview mark from its own subpath * fix(studio-server): find preview images with the linear html scanner * chore(core): drop two doc comments the scanner's names already carry * fix(studio-server): serve the preview mark as its own meta, apart from the GSAP fallback script * fix(studio-server): capture thumbnails and frames from the preview without lazy images or the mark * fix(core): let the full readiness scan wait on every image except lazy ones off the first frame * fix(studio-server): keep an authored loading attribute in any letter case on preview images * fix(core): leave template content out of findStartTags so preview images match the DOM * fix(studio): send Ask agent the live markup without the preview loading marks * chore(core): drop the template note from findStartTags, its test carries it * perf(studio-server): splice lazy attributes into the preview in one pass * fix(studio): keep authored image loading on copy and Ask agent by marking preview-made lazy images * test(studio-server): follow the capture preview URL back to its sub-composition for every project id * refactor: name the upcoming-clip and GSAP fallback marks once * fix(studio-server): keep capture builds out of the on-disk preview store |