MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / seekTo

Function seekTo

packages/cli/src/commands/validate.ts:59–75  ·  view source on GitHub ↗
(page: import("puppeteer-core").Page, time: number)

Source from the content-addressed store, hash-verified

57}
58
59async function seekTo(page: import("puppeteer-core").Page, time: number): Promise<void> {
60 await page.evaluate((t: number) => {
61 if (window.__hf && typeof window.__hf.seek === "function") {
62 window.__hf.seek(t);
63 return;
64 }
65 const timelines = (window as unknown as Record<string, unknown>).__timelines as
66 | Record<string, { seek: (t: number) => void }>
67 | undefined;
68 if (timelines) {
69 for (const tl of Object.values(timelines)) {
70 if (typeof tl.seek === "function") tl.seek(t);
71 }
72 }
73 }, time);
74 await new Promise((r) => setTimeout(r, SEEK_SETTLE_MS));
75}
76
77/**
78 * Flag `<video>`/`<audio>` clips whose source is meaningfully shorter than their

Callers 1

runContrastAuditFunction · 0.70

Calls 2

evaluateMethod · 0.80
seekMethod · 0.65

Tested by

no test coverage detected