mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
docs: state the 45 s cost of a missing data-no-timeline (#4402)
The attribute is in the HTML schema reference and enforced by the missing_data_no_timeline lint rule, but no page said what omitting it costs: a composition that never registers a GSAP timeline waits out player-ready-timeout (45 s by default) on every render. That matters for triage because it is a fixed cost. "The render is slow" currently lists only causes that scale with the project - draft quality, media size, filter complexity - so an author whose renders are uniformly 45 s long reads the section, tunes the things it names, and sees no change. - troubleshooting: add a symptom-keyed entry above "The render is slow", and point that section at it for the constant-penalty case. - html-schema: give the attribute row the consequence and the lint code. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
861fcc4dd0
commit
480beb62bd
@@ -186,8 +186,39 @@ Use Docker when you need a pinned rendering environment:
|
||||
npx hyperframes render --docker --output output.mp4
|
||||
```
|
||||
|
||||
### Every render takes about 45 seconds longer than expected
|
||||
|
||||
A composition that never registers a GSAP timeline still makes the producer wait
|
||||
for one. The producer polls `window.__timelines[<id>]` until the composition
|
||||
player reports ready, then gives up after `player-ready-timeout` (45 s by
|
||||
default). The wait is a fixed cost paid on every render, so it does not shrink
|
||||
when you lower quality or resize media.
|
||||
|
||||
Declare that the composition has no timeline:
|
||||
|
||||
```html
|
||||
<div
|
||||
data-composition-id="promo"
|
||||
data-no-timeline
|
||||
data-width="1920"
|
||||
data-height="1080"
|
||||
data-duration="6"
|
||||
></div>
|
||||
```
|
||||
|
||||
`npx hyperframes lint` reports the missing attribute as
|
||||
`missing_data_no_timeline`. Compositions that do register a timeline are
|
||||
unaffected: the poll returns as soon as the timeline appears, long before the
|
||||
timeout.
|
||||
|
||||
To register a timeline instead of skipping the wait, see
|
||||
[GSAP animation](/guides/gsap-animation).
|
||||
|
||||
### The render is slow
|
||||
|
||||
The causes below scale with the project. For a constant penalty on every render,
|
||||
check the timeline poll above first.
|
||||
|
||||
During iteration:
|
||||
|
||||
- use draft quality;
|
||||
|
||||
@@ -80,7 +80,7 @@ timeline registry key.
|
||||
| `data-start="0"` | Yes on the top-level root | Start of the composition |
|
||||
| `data-width` and `data-height` | Yes | Authored frame dimensions in pixels |
|
||||
| `data-duration` | Usually | Total render duration in seconds |
|
||||
| `data-no-timeline` | Only for a timeline-free composition | Tells the runtime not to wait for a timeline |
|
||||
| `data-no-timeline` | Only for a timeline-free composition | Tells the runtime not to wait for a timeline. Without it a composition that never registers one still waits out `player-ready-timeout` (45 s by default) on every render; `hyperframes lint` reports this as `missing_data_no_timeline` |
|
||||
|
||||
An explicit root `data-duration` is the render length. The compiler reads it
|
||||
before composition scripts run, so a script or variable override cannot change
|
||||
|
||||
Reference in New Issue
Block a user