(page: import("puppeteer-core").Page, time: number)
| 57 | } |
| 58 | |
| 59 | async 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 |
no test coverage detected