mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 23:03:09 +00:00
fix(cli): address review — fps comment, fileServer cross-ref, duration note
- Add comment explaining hardcoded fps=30 (runtime's canonicalFps default, not exposed on PlayerAPI) - Add cross-reference comments between init.ts and fileServer.ts explaining their different __renderReady timing semantics
This commit is contained in:
@@ -276,6 +276,7 @@ async function captureSnapshots(
|
||||
for (let i = 0; i < positions.length; i++) {
|
||||
const time = positions[i]!;
|
||||
|
||||
// 30 = runtime's default canonicalFps (not exposed on PlayerAPI)
|
||||
await page.evaluate((t: number) => {
|
||||
const player = (window as any).__player;
|
||||
if (!player) return;
|
||||
|
||||
@@ -1634,6 +1634,8 @@ export function initSandboxRuntimeModular(): void {
|
||||
player._timeline = state.capturedTimeline;
|
||||
}
|
||||
|
||||
// __renderReady = timeline is bound, safe for deterministic seeking.
|
||||
// fileServer.ts sets this immediately (no timeline to bind in its runtime).
|
||||
if (state.capturedTimeline) {
|
||||
(window as Window & { __renderReady?: boolean }).__renderReady = true;
|
||||
}
|
||||
|
||||
@@ -390,6 +390,8 @@ const RENDER_MODE_SCRIPT = `(function() {
|
||||
},
|
||||
};
|
||||
window.__playerReady = true;
|
||||
// Media-fallback player has no timeline to bind, so render-ready is immediate.
|
||||
// init.ts defers __renderReady until the timeline is bound — different runtime.
|
||||
window.__renderReady = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user