Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

Preview scene: paint at once when the stage changes size so the cleared canvas never shows black

Bowen Xue0ecccdbef761
diff --git a/web/preview_scene.js b/web/preview_scene.js
index 2a79ed2..1b63005 100644
--- a/web/preview_scene.js
+++ b/web/preview_scene.js
@@ -104,7 +104,10 @@ export function createPreviewScene(stage, progress, media) {
width = stage.clientWidth; height = stage.clientHeight;
const scale = Math.min(window.devicePixelRatio || 1, 1.5);
canvas.width = Math.round(width * scale); canvas.height = Math.round(height * scale);
- ctx.setTransform(scale, 0, 0, scale, 0, 0); schedule();
+ ctx.setTransform(scale, 0, 0, scale, 0, 0);
+ // Resizing clears the canvas; paint now so the throttled frame loop cannot leave a black frame.
+ if (!disposed && visible && width && height) paint();
+ schedule();
});
const observer = new MutationObserver(state);
observer.observe(progress, {attributes: true, attributeFilter: ['hidden', 'style', 'data-counted']});