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

Function getCompositionDuration

packages/cli/src/commands/validate.ts:51–57  ·  view source on GitHub ↗
(page: import("puppeteer-core").Page)

Source from the content-addressed store, hash-verified

49}
50
51async function getCompositionDuration(page: import("puppeteer-core").Page): Promise<number> {
52 return page.evaluate(() => {
53 if (window.__hf?.duration && window.__hf.duration > 0) return window.__hf.duration;
54 const root = document.querySelector("[data-composition-id][data-duration]");
55 return root ? parseFloat(root.getAttribute("data-duration") ?? "0") : 0;
56 });
57}
58
59async function seekTo(page: import("puppeteer-core").Page, time: number): Promise<void> {
60 await page.evaluate((t: number) => {

Callers 1

runContrastAuditFunction · 0.70

Calls 3

evaluateMethod · 0.80
querySelectorMethod · 0.65
getAttributeMethod · 0.65

Tested by

no test coverage detected