mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
fix(core): motion blur no longer blacks out videos inside sub-compositions (#6252)
* fix(core): motion blur no longer blacks out videos inside sub-compositions * chore(core): drop the explanatory comment from the motion blur isolate move
This commit is contained in:
@@ -705,6 +705,20 @@ describe("two-phase frames", () => {
|
||||
expect(el.hasAttribute(MOVER)).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps the page visible until an engine frame is armed, so video frames inject into it", async () => {
|
||||
installHtmlInCanvas();
|
||||
const { root, h } = movingHost();
|
||||
initCaptureMotionBlur(h);
|
||||
const done = paintCaptureMotionBlur(0.5, { engineMode: true });
|
||||
expect(root.hasAttribute(ONLY)).toBe(false);
|
||||
releaseCaptureMotionBlurFrame();
|
||||
expect(root.hasAttribute(ONLY)).toBe(true);
|
||||
captureCanvas(root).dispatchEvent(new Event("paint"));
|
||||
captureCanvas(root).dispatchEvent(new Event("paint"));
|
||||
win.__hf_page_composite_resolve?.();
|
||||
await done;
|
||||
});
|
||||
|
||||
it("shows plain DOM, not a half frame, when the engine's step runs before the background capture", async () => {
|
||||
installHtmlInCanvas();
|
||||
const { root, el, h } = movingHost();
|
||||
|
||||
@@ -527,7 +527,7 @@ function createInstance(host: CaptureMotionBlurHost, config: Config, form: HtmlI
|
||||
resolve();
|
||||
},
|
||||
};
|
||||
if (pending.phase === "movers") isolate(pending);
|
||||
if (pending.phase === "movers" && !engineMode) isolate(pending);
|
||||
if (engineMode) return;
|
||||
startTimer();
|
||||
src.requestPaint();
|
||||
@@ -576,6 +576,7 @@ function createInstance(host: CaptureMotionBlurHost, config: Config, form: HtmlI
|
||||
arm: () => {
|
||||
if (!pending || pending.armed) return;
|
||||
pending.armed = true;
|
||||
if (pending.phase === "movers") isolate(pending);
|
||||
pending.startTimer();
|
||||
src.requestPaint();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user