Skip to content

docs(variables): say what can be a variable, including a video or sound per account - #7530

Merged
miguel-heygen merged 2 commits into
mainfrom
docs/variables-what-can-be-a-variable
Nov 11, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
docs/variables-what-can-be-a-variable

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

The variables page now says what can be a variable. It gains a plain-words table of the seven kinds, and a "Swap in a video or a sound" section: a link declared as a string and bound to a <video> or <audio> with data-var-src, the per-account example (render the same saved project once per account with --variables), and the limits.

Why

The page listed the kinds in a table of uses and never said that video and sound are links bound to a media element, what the render does with them, or where it stops.

Notes

  • Docs only: docs/concepts/variables.mdx. No new page; the existing variables page already holds the kinds table, so the section sits beside it.
  • The "length and sound follow the bound clip" paragraph describes the behaviour in fix(producer): render variable-bound media at the bound clip's length and loudness #7529. Merge after it.
  • Limits written from the code: tags that accept data-var-src (VAR_SRC_TAGS, applyVariableBindings.ts), the URL gate (isSafeMediaUrl, compositionVariables.ts), nested mounts with their own data-variable-values resolved by the browser.

@mintlify

mintlify Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Nov 11, 2026, 12:38 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes at acc4ba67. One blocker in the main example.

Blocker: the welcome-clip example doesn't swap the clip as written. The HTML is labelled compositions/welcome.html, but the command is a bare npx hyperframes render, which renders index.html (render.ts, --composition). That leaves two possible setups, and neither works:

  • welcome.html isn't mounted from index.html, so it isn't rendered at all.
  • welcome.html is mounted as a sub-composition. stashInstanceVariables (compositionLoader.ts) builds that scope from its declared defaults plus the host's data-variable-values only. --variables reaches it only as CSS custom properties, so data-var-src="welcomeClip" keeps the default. The #7529 pre-pass runs on the entry HTML before inlining, so it doesn't bind it either. The "length and sound follow the clip" paragraph then doesn't hold.

Fix either way:

  • Label the block index.html, which matches the page's own "Override top-level values from the CLI".
  • Or add --composition compositions/welcome.html to the command.

Nits:

  • The URL-gate bullet says "a relative path or an http, https, or blob URL". Root-absolute paths (/clips/a.mp4) also pass, because isSafeMediaUrl accepts any value with no scheme. Maybe "a path, or an http/https/blob URL".
  • The new ## What can be a variable sits inside "Advanced: declare the approved inputs". It turns the existing ### Say what a slot means into a child of it, so the outline reads oddly.

Everything else in the limits list matches the code: VAR_SRC_TAGS, a data: video being dropped with a warning, and nested data-variable-values mounts resolved by the browser.

@miguel-heygen

Copy link
Copy Markdown
Collaborator Author

Fixed at 8fd91d5: the example block is now labelled index.html (top-level, matching the page's CLI override section), the URL bullet says "a path or an http, https, or blob URL", and What can be a variable is now a ### under the Advanced section so Say what a slot means stays its sibling.

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve at 8fd91d50. No blockers. All three points from the earlier review are fixed, and nothing else changed:

  • The example is now index.html. A bare npx hyperframes render uses it, and --variables welcomeClip goes through the top-level scope that #7529 binds before measuring. The "length and sound follow the clip" paragraph is now true for this setup.
  • The URL bullet now says "a path", which matches isSafeMediaUrl (any value with no scheme passes).
  • ### What can be a variable now sits under "Advanced: declare the approved inputs", so the outline reads cleanly. The cross-link to #swap-in-a-video-or-a-sound matches the heading.

The length/sound paragraph depends on #7529, which I approved at 364baab6. Keep the stated order: merge #7529 first.

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 28d69d9 Nov 11, 2026
64 checks passed
@miguel-heygen
miguel-heygen deleted the docs/variables-what-can-be-a-variable branch November 11, 2026 03:33
@miguel-heygen miguel-heygen mentioned this pull request Nov 11, 2026
3 of 4 tasks

This branch was successfully deployed

1 active deployment
staging - docs — 8fd91d50 Deployed Nov 11, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant