Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions packages/cli/src/commands/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,13 @@ async function captureSnapshots(
syncVideoFrameVisibility = engine.syncVideoFrameVisibility;
extractMediaMetadata = engine.extractMediaMetadata;
} catch {
// Engine unavailable in this install — snapshot will still run, and
// compositions without <video data-start> get exactly the old behaviour.
// Engine unavailable in this install — snapshot still runs, but any
// <video data-start> will screenshot black (chrome-headless ignores
// programmatic currentTime writes). Say so instead of silently
// shipping black frames (two wild Windows reports).
console.warn(
` ${c.warn("⚠")} @hyperframes/engine unavailable — <video> elements will appear black in snapshots. Verify media via a draft render's extracted frames instead.`,
);
}
const alphaDecoderCache = new Map<string, Promise<boolean>>();
const shouldUseVp9AlphaDecoder = (filePath: string): Promise<boolean> => {
Expand Down Expand Up @@ -426,6 +431,13 @@ async function captureSnapshots(
});
}

if (active.length > 0 && updates.length < active.length) {
const missed = active.length - updates.length;
console.warn(
` ${c.warn("⚠")} ${missed}/${active.length} active <video> frame(s) could not be extracted at ${time.toFixed(1)}s — those videos will appear black/stale in this snapshot`,
);
}

// Sync visibility even when empty — clears stale overlays from prior seeks
try {
if (updates.length > 0) {
Expand All @@ -436,7 +448,9 @@ async function captureSnapshots(
active.map((a) => a.id),
);
} catch {
/* fall through to plain screenshot */
console.warn(
` ${c.warn("⚠")} video frame injection failed at ${time.toFixed(1)}s — <video> elements will appear black/stale in this snapshot`,
);
}
}

Expand Down
Loading