Skip to content

🎥 Make videos programmatically with React

docs: note when to remove canvas paint workaround

JonnyBurgera7b748f0b0e9
diff --git a/packages/web-renderer/src/html-in-canvas.ts b/packages/web-renderer/src/html-in-canvas.ts
index 51d1bea3f5..5f5b9bcda7 100644
--- a/packages/web-renderer/src/html-in-canvas.ts
+++ b/packages/web-renderer/src/html-in-canvas.ts
@@ -103,6 +103,8 @@ const waitForPaint = (
return new Promise((resolve) => {
// Chromium dispatches paint during compositor commit. Resume in a new task
// so WebGL context eviction cannot destroy a texture layer during commit.
+ // Remove this workaround once the Chromium fix ships in supported Chrome versions.
+ // https://github.com/remotion-dev/remotion/issues/12293
layoutCanvas.addEventListener('paint', () => setTimeout(resolve, 0), {
once: true,
});