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

Function extractDuration

packages/sdk/src/document.ts:191–195  ·  view source on GitHub ↗
(doc: Document)

Source from the content-addressed store, hash-verified

189}
190
191function extractDuration(doc: Document): number | null {
192 const root = findRoot(doc) ?? doc.body;
193 const dur = root?.getAttribute("data-duration");
194 return dur ? parseFloat(dur) : null;
195}
196
197/**
198 * Build the element tree from an already-parsed (hf-id-stamped) linkedom Document.

Callers 1

buildDocumentFunction · 0.85

Calls 2

findRootFunction · 0.85
getAttributeMethod · 0.65

Tested by

no test coverage detected