(duration: number)
| 61 | } |
| 62 | |
| 63 | function buildMotionSampleTimes(duration: number): number[] { |
| 64 | if (!Number.isFinite(duration) || duration <= 0) return []; |
| 65 | const count = Math.min(MOTION_MAX_SAMPLES, Math.max(2, Math.ceil(duration * MOTION_FPS) + 1)); |
| 66 | const step = duration / (count - 1); |
| 67 | return Array.from({ length: count }, (_, index) => Math.round(index * step * 1000) / 1000); |
| 68 | } |
| 69 | |
| 70 | async function getCompositionDuration(page: import("puppeteer-core").Page): Promise<number> { |
| 71 | return page.evaluate(() => { |