diff --git a/packages/lint/src/rules/media.test.ts b/packages/lint/src/rules/media.test.ts
index 908e05491d..aac27a0e67 100644
--- a/packages/lint/src/rules/media.test.ts
+++ b/packages/lint/src/rules/media.test.ts
@@ -354,6 +354,7 @@ describe("media rules", () => {
expect(hint).toContain('id="wrap"');
expect(hint).toContain('data-start="2"');
expect(hint).not.toContain('data-start="0"');
+ expect(hint).toContain("takes no timing from it");
// The hint's one step: the video leaves the wrapper and takes its timing.
const followed = await codes(
@@ -552,6 +553,21 @@ describe("media rules", () => {
expect(found).toContain("video_audio_double_source");
});
+ it("says a timed video inside a timed wrapper gets no timing from the wrapper, so the wrapper stays untimed", async () => {
+ const result = await lintHyperframeHtml(`
+
+
+
+`);
+ const hint = result.findings.find((f) => f.code === "video_nested_in_timed_element")?.fixHint;
+ expect(hint).toContain("takes no timing from its wrapper");
+ expect(hint).not.toContain("wrapper OR the video");
+ });
+
it("does NOT flag as nested in a void element with data-start (regression)", async () => {
// Regression: void elements like have no closing tag, so the previous
// implementation kept them on the parent stack indefinitely and flagged any
diff --git a/packages/lint/src/rules/media.ts b/packages/lint/src/rules/media.ts
index ecb3c4f44d..d9640478df 100644
--- a/packages/lint/src/rules/media.ts
+++ b/packages/lint/src/rules/media.ts
@@ -647,7 +647,7 @@ export const mediaRules: Array<(ctx: LintContext) => HyperframeLintFinding[]> =
message: ` with data-start is nested inside <${parent.name}${parent.id ? ` id="${parent.id}"` : ""}> which also has data-start. The frame extractor resolves the video's start from its own data-start without the wrapper's offset, while visibility uses the wrapper's window, so the two disagree: the clip shows the wrong source frames and then disappears partway through its slot.`,
elementId: readAttr(tag.raw, "id") || undefined,
fixHint:
- "Time the wrapper OR the video, never both: remove data-start from the wrapper (use it as a non-timed visual container), or move the up to be a direct child of the stage.",
+ "A takes no timing from its wrapper: time the and leave the wrapper untimed (remove its data-start; it only places or animates), or move the up to be a direct child of the stage.",
snippet: truncateSnippet(tag.raw),
});
}
@@ -740,7 +740,7 @@ export const mediaRules: Array<(ctx: LintContext) => HyperframeLintFinding[]> =
message: `<${tag.name}${hasId ? ` id="${hasId}"` : ""}> has src but no data-start. HyperFrames cannot own playback for untimed media, so preview and render behavior can diverge.`,
elementId: hasId || undefined,
fixHint: wrapper
- ? `This <${tag.name}> sits inside the timed <${wrapper.name}${wrapper.id ? ` id="${wrapper.id}"` : ""}> (data-start="${wrapper.start}"), and the wrapper's data-start would then clash. Move the <${tag.name}> out as a direct child of the stage and give it that wrapper's data-start="${wrapper.start}"${wrapper.duration ? ` and data-duration="${wrapper.duration}"` : ""}.`
+ ? `This <${tag.name}> sits inside the timed <${wrapper.name}${wrapper.id ? ` id="${wrapper.id}"` : ""}> (data-start="${wrapper.start}") and takes no timing from it, so without its own data-start it plays from composition time 0, and a data-start on it would clash with the wrapper's. Move the <${tag.name}> out as a direct child of the stage and give it that wrapper's data-start="${wrapper.start}"${wrapper.duration ? ` and data-duration="${wrapper.duration}"` : ""}.`
: `Add data-start="0" (or the intended start time) and data-duration if the clip should stop before the source ends.`,
snippet: truncateSnippet(tag.raw),
});
diff --git a/skills-manifest.json b/skills-manifest.json
index 9eeef1c2ea..f2e269a911 100644
--- a/skills-manifest.json
+++ b/skills-manifest.json
@@ -6,7 +6,7 @@
"files": 2
},
"hyperframes": {
- "hash": "7e43b38bd9936270",
+ "hash": "c8d63424db2726d3",
"files": 77
},
"hyperframes-cli": {
diff --git a/skills/hyperframes/SKILL.md b/skills/hyperframes/SKILL.md
index e7d20ca595..e1b522d397 100644
--- a/skills/hyperframes/SKILL.md
+++ b/skills/hyperframes/SKILL.md
@@ -26,7 +26,7 @@ Build what was asked: no voiceover or captions and no new aspect ratio unless th
5. Never tween `display`, `visibility` or `autoAlpha` on a `.clip`; animate a child.
6. No CSS `transform` on an element GSAP transforms; animate transforms, not `left`/`top`/`width`/`height`.
7. Never `play()`, `pause()` or seek media. A `` keeps its sound with `data-has-audio="true"`, else it is `muted`; music, voice, replacement sound and J/L cuts are a separate ``.
-8. Every `` has an `id` or it is left out of the mix. No `crossorigin` on media. Time a `` or its wrapper, never both.
+8. Every `` has an `id` or it is left out of the mix. No `crossorigin` on media. Time the ``, never its wrapper.
9. Only the bundled fonts (`references/format.md`) resolve by name; any other family needs `@font-face` to a file in `assets/fonts/`.
10. Asset paths: `assets/...` (no leading `/`), in sub-compositions too.
11. Grades, grain, blur and vignettes on footage go through `npx hyperframes media-treatment` (`/media-use`), never CSS filters.
diff --git a/skills/hyperframes/references/format.md b/skills/hyperframes/references/format.md
index b8c767991d..d02443b26b 100644
--- a/skills/hyperframes/references/format.md
+++ b/skills/hyperframes/references/format.md
@@ -146,7 +146,7 @@ Studio's Detach audio writes a muted `` and an `` of the same file
| `video_missing_muted` | A timed `` gets `data-has-audio="true"` or `muted` |
| `gsap_css_transform_conflict` | Set the start inside the tween (`gsap.fromTo`) instead of a CSS `transform` |
| `gsap_animates_clip_element` | Animate a child of the `.clip`, or its `opacity` |
-| `video_nested_in_timed_element` | Time the `` or its wrapper, not both |
+| `video_nested_in_timed_element` | Time the ``; its wrapper stays untimed and gives it no timing |
| `media_missing_id`, `media_crossorigin_breaks_preview` | Give every `` an `id`; drop `crossorigin` |
| `gsap_timeline_registered_before_async_build` | Register the timeline at the end of the async callback |
| `standalone_composition_wrapped_in_template` | Only scene files use `` |