mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-09 12:00:26 +00:00
fix(video): hold final frame through composition
This commit is contained in:
@@ -127,8 +127,9 @@ export function raceMediaReady(
|
||||
}
|
||||
|
||||
/**
|
||||
* Flag `<video>`/`<audio>` clips whose source is meaningfully shorter than their
|
||||
* `data-duration` slot (the slot gets silently shortened in renders). Runs in
|
||||
* Flag `<audio>` clips whose source is meaningfully shorter than their
|
||||
* `data-duration` slot (the slot gets silently shortened in renders). Videos
|
||||
* intentionally hold their final frame through an explicit longer slot. Runs in
|
||||
* the live page to read each element's intrinsic `.duration`, which static lint
|
||||
* can't see.
|
||||
*/
|
||||
@@ -140,7 +141,7 @@ export async function auditClipDurations(
|
||||
// fallow-ignore-next-line complexity
|
||||
const clips = await page.evaluate(async (maxWaitMs: number) => {
|
||||
const nodes = Array.from(
|
||||
document.querySelectorAll("video[data-duration], audio[data-duration]"),
|
||||
document.querySelectorAll("audio[data-duration]"),
|
||||
) as HTMLMediaElement[];
|
||||
|
||||
// The caller's page-settle sleep is a flat, unconditional wait shared with
|
||||
|
||||
Reference in New Issue
Block a user