mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix: speed up video frame injection renders (#596)
This commit is contained in:
@@ -446,13 +446,15 @@ export async function injectVideoFramesBatch(
|
||||
}
|
||||
}
|
||||
img.decoding = "sync";
|
||||
img.src = item.dataUri;
|
||||
pendingDecodes.push(
|
||||
img
|
||||
.decode()
|
||||
.catch(() => undefined)
|
||||
.then(() => undefined),
|
||||
);
|
||||
if (img.getAttribute("src") !== item.dataUri) {
|
||||
img.src = item.dataUri;
|
||||
pendingDecodes.push(
|
||||
img
|
||||
.decode()
|
||||
.catch(() => undefined)
|
||||
.then(() => undefined),
|
||||
);
|
||||
}
|
||||
img.style.opacity = String(computedOpacity);
|
||||
img.style.visibility = "visible";
|
||||
// Hide the native <video> with visibility only — never clobber inline
|
||||
|
||||
Reference in New Issue
Block a user