🎥 Make videos programmatically with React
docs: document stable Chrome for HTML-in-canvas
Jonny Burgere0e95c5e7e82
diff --git a/packages/core/src/HtmlInCanvas.tsx b/packages/core/src/HtmlInCanvas.tsxindex a11a0a8e6c..9ec5c68c84 100644--- a/packages/core/src/HtmlInCanvas.tsx+++ b/packages/core/src/HtmlInCanvas.tsx@@ -301,7 +301,7 @@ const HtmlInCanvasInner = forwardRef<if (!isHtmlInCanvasSupported()) {cancelRender(new Error(- 'HTML in Canvas is not supported. Open this page in Chrome Canary with chrome://flags/#canvas-draw-element enabled.',+ 'HTML in Canvas is not supported. Open this page in Chrome with chrome://flags/#canvas-draw-element enabled.',),);}diff --git a/packages/dockerfiles/README.md b/packages/dockerfiles/README.mdindex 3565bd42d0..070146fecd 100644--- a/packages/dockerfiles/README.md+++ b/packages/dockerfiles/README.md@@ -32,6 +32,6 @@ Located in `packages/example/src/BrowserTest/index.tsx`, it tests:## html-in-canvas composition-Located in `packages/example/src/HtmlInCanvas/index.tsx`, it tests the experimental [WICG html-in-canvas](https://github.com/WICG/html-in-canvas) `CanvasRenderingContext2D.drawElementImage()` API. If the API is unavailable in the bundled Chrome (e.g. without `chrome://flags/#canvas-draw-element` or Chrome Canary), the composition fails the render with an error.+Located in `packages/example/src/HtmlInCanvas/index.tsx`, it tests the experimental [WICG html-in-canvas](https://github.com/WICG/html-in-canvas) `CanvasRenderingContext2D.drawElementImage()` API. If the API is unavailable in the bundled Chrome (for example without `chrome://flags/#canvas-draw-element` enabled), the composition fails the render with an error.The bundle is built from `packages/example` and copied into each Docker container during build.diff --git a/packages/docs/docs/client-side-rendering/html-in-canvas.mdx b/packages/docs/docs/client-side-rendering/html-in-canvas.mdxindex e3aa05f54e..fdb58565d5 100644--- a/packages/docs/docs/client-side-rendering/html-in-canvas.mdx+++ b/packages/docs/docs/client-side-rendering/html-in-canvas.mdx@@ -19,7 +19,7 @@ This is not the same as the [`<HtmlInCanvas>`](/docs/html-in-canvas) component fOn supported Chromium-based browsers, [`@remotion/web-renderer`](/docs/web-renderer) can optionally capture full frames using the experimental [HTML-in-canvas](/docs/html-in-canvas) APIs.:::info-As of April 2026, this feature requires [Chrome Canary](https://www.google.com/chrome/canary/). Regular Chrome has partial support ([`drawElementImage`](https://github.com/WICG/html-in-canvas#2-drawelementimage-and-webglwebgpu-equivalents)) but is missing `canvas.requestPaint()`, which can cause rendering issues such as frames being repeated. See [Compatibility](#compatibility) for details.+Use a recent version of Google Chrome or another Chromium-based browser with `chrome://flags/#canvas-draw-element` enabled. Current Chrome stable releases ship `canvas.requestPaint()` together with [`drawElementImage`](https://github.com/WICG/html-in-canvas#2-drawelementimage-and-webglwebgpu-equivalents), which is required for correct frame capture. See [Compatibility](#compatibility) for details.:::Enabling the option does not guarantee that this path runs. If the browser does not have HTML-in-canvas enabled, it falls back to the [default frame capturing mechanism](/docs/client-side-rendering/how-it-works).@@ -82,7 +82,7 @@ If HTML-in-canvas is available, and allowed, but not used, a warning will be priNot using HTML-in-canvas: drawElementImage is available but canvas.requestPaint() is missing. Use a Chromium version that ships requestPaint.```-This can happen for example if enabling the feature in Chrome rather than Chrome Canary (as of time of writing in April 2026).+This can happen for example when using an older Chromium build that does not ship `canvas.requestPaint()`.If HTML-in-canvas is not available, or not allowed, no warning will be printed.@@ -102,9 +102,9 @@ If HTML-in-canvas is not available, or not allowed, no warning will be printed.hideServers/>-HTML-in-canvas depends on Chromium flag `chrome://flags/#canvas-draw-element` which needs to be explicitly enabled as of time of writing in April 2026.+HTML-in-canvas depends on Chromium flag `chrome://flags/#canvas-draw-element`, which must be enabled explicitly.-As of April 2026, [Chrome Canary](https://www.google.com/chrome/canary/) is required for full support. Regular Chrome exposes [`drawElementImage`](https://github.com/WICG/html-in-canvas#2-drawelementimage-and-webglwebgpu-equivalents) when the flag is enabled, but does not yet ship `canvas.requestPaint()`. Without `requestPaint()`, the renderer cannot synchronize paint operations, which can lead to repeated or incorrect frames.+Use a recent Chrome or Chromium version with the flag enabled for full support. Very old Chromium builds may expose [`drawElementImage`](https://github.com/WICG/html-in-canvas#2-drawelementimage-and-webglwebgpu-equivalents) but omit `canvas.requestPaint()`. Without `requestPaint()`, the renderer cannot synchronize paint operations, which can lead to repeated or incorrect frames.## See alsodiff --git a/packages/docs/docs/contributing/presentation.mdx b/packages/docs/docs/contributing/presentation.mdxindex f38105c0cc..38cd63a972 100644--- a/packages/docs/docs/contributing/presentation.mdx+++ b/packages/docs/docs/contributing/presentation.mdx@@ -84,7 +84,7 @@ If you want to contribute the presentations back into the `@remotion/transitions<Step>4</Step> Handle the boundary cases inside the JS <code>draw()</code> function: when <code>prevImage</code> is <code>null</code>, force <code>time = 0</code>; when <code>nextImage</code> is <code>null</code>, force <code>time = 1</code>.<br /><Step>5</Step> Set <code>serverSideRendering</code>, <code>nodejs</code>, <code>bun</code> and <code>serverlessFunctions</code> to <code>true</code> in the <code><CompatibilityTable /></code> on your docs page — Remotion's bundled Chromium for Lambda already includes the required APIs. Set <code>firefox</code> and <code>safari</code> to <code>false</code>.<br /><Step>6</Step> The table-of-contents preview should always render the pre-rendered fallback video — the live <code><Player></code> would crash for readers without HTML-in-canvas enabled, and a tiny TOC tile gains nothing from running the real shader. See <a href="https://github.com/remotion-dev/remotion/blob/main/packages/docs/components/transitions/zoom-blur-toc-preview.tsx"><code>zoom-blur-toc-preview.tsx</code></a> for the pattern. For the in-page <code><Demo></code>, branch on <code>HtmlInCanvas.isSupported()</code> via the <code>useHtmlInCanvasDocsDemoBranch()</code> hook so supporting browsers see the real shader and others fall back to the video — see <a href="https://github.com/remotion-dev/remotion/blob/main/packages/docs/components/demos/ZoomBlurDemo.tsx"><code>ZoomBlurDemo.tsx</code></a>.<br />-<Step>7</Step> Render the fallback videos from a composition under <code>packages/example/src/HtmlInCanvas/</code> using <code>npx remotion render <id> --browser-executable=<path-to-Chrome-Canary> --allow-html-in-canvas</code>. Drop a high-res 1920×1080 file at <code>packages/docs/static/img/<name>.mp4</code> for the docs page and a low-res 540×280 file at <code><name>-thumb.mp4</code> for the TOC tile.<br />+<Step>7</Step> Render the fallback videos from a composition under <code>packages/example/src/HtmlInCanvas/</code> using <code>npx remotion render <id> --browser-executable=<path-to-chrome> --allow-html-in-canvas</code>. Drop a high-res 1920×1080 file at <code>packages/docs/static/img/<name>.mp4</code> for the docs page and a low-res 540×280 file at <code><name>-thumb.mp4</code> for the TOC tile.<br /><Step>8</Step> Add an <code><HtmlInCanvasLabel /></code> next to the presentation name in the table-of-contents tile to flag the requirement.## See alsodiff --git a/packages/docs/docs/html-in-canvas-guide.mdx b/packages/docs/docs/html-in-canvas-guide.mdxindex 073a755693..0f0d100e9f 100644--- a/packages/docs/docs/html-in-canvas-guide.mdx+++ b/packages/docs/docs/html-in-canvas-guide.mdx@@ -20,15 +20,15 @@ crumb: 'Designing visuals'Regular video editors are canvas-based which allows for complex effects and compositing that is not possible with plain CSS.-[HTML-in-canvas](https://github.com/WICG/html-in-canvas) is an experimental browser API currently only available in Chrome Canary behind a flag, which allows you to draw a live DOM node into a `<canvas>` and post-process it with the Canvas 2D API, WebGL or WebGPU.+[HTML-in-canvas](https://github.com/WICG/html-in-canvas) is an experimental browser API available in Chrome and other Chromium-based browsers behind a flag, which allows you to draw a live DOM node into a `<canvas>` and post-process it with the Canvas 2D API, WebGL or WebGPU.Remotion offers a [`<HtmlInCanvas>`](/docs/remotion/html-in-canvas) component, [transitions](#with-remotiontransitions) and HTML-in-canvas-based client-side rendering.-## Enabling the flag in Chrome Canary+## Enabling the flag in Chrome-To preview HTML-in-canvas effects in the [Remotion Studio](/docs/studio), you need to use [Chrome Canary](https://www.google.com/chrome/canary/) v149 and enable a flag:+To preview HTML-in-canvas effects in the [Remotion Studio](/docs/studio), use [Google Chrome](https://www.google.com/chrome/) v149 or later and enable a flag:-1. Install [Chrome Canary](https://www.google.com/chrome/canary/).+1. Install or update [Google Chrome](https://www.google.com/chrome/).2. Open `chrome://flags/#canvas-draw-element`.3. Set the `HTML-in-Canvas` flag to `Enabled` and restart.@@ -90,7 +90,7 @@ You can also build your own — see [Making a custom HTML-in-canvas presentation## Limitations-HTML-in-canvas is only available in [Chrome Canary](https://www.google.com/chrome/canary/) (Chrome 149 and later) with the `chrome://flags/#canvas-draw-element` flag enabled.+HTML-in-canvas is only available in Chrome 149 and later with the `chrome://flags/#canvas-draw-element` flag enabled.The API is unstable - Chrome may change the API or even remove it in the future.Nesting `<HtmlInCanvas>` inside another `<HtmlInCanvas>` is not supported. Chrome would only display the outer effect, so this is invalid in Remotion. It will throw an error.@@ -100,7 +100,7 @@ If you need to combine multiple effects, try to merge them into a single `onPainFrom [`v4.0.455`](https://github.com/remotion-dev/remotion/releases/tag/v4.0.455), render is supported locally via [`npx remotion render`](/docs/cli/render) and Studio, on [Lambda](/docs/lambda), on [Vercel](/docs/vercel) and through [server-side rendering](/docs/ssr) APIs.-We compiled a version of Chrome Canary and made it the default, and enabled the flag for you.+We compiled a version of Chrome and made it the default, and enabled the flag for you.If your effect uses a WebGL shader, pass [`--gl=angle`](/docs/gl-options) to make the render work:diff --git a/packages/docs/docs/remotion/html-in-canvas.mdx b/packages/docs/docs/remotion/html-in-canvas.mdxindex aeba7644ce..0ddc71d4c7 100644--- a/packages/docs/docs/remotion/html-in-canvas.mdx+++ b/packages/docs/docs/remotion/html-in-canvas.mdx@@ -8,7 +8,7 @@ crumb: 'API'This component renders its children into a `<canvas>` using the browser’s [HTML-in-canvas](https://github.com/WICG/html-in-canvas) API and allows you to draw an effect using the Canvas 2D API, WebGL or WebGPU.-For an overview, examples and how to enable the Chrome Canary flag, see the [HTML-in-canvas guide](/docs/html-in-canvas).+For an overview, examples and how to enable the Chrome flag, see the [HTML-in-canvas guide](/docs/html-in-canvas).HTML-in-canvas is only available in Chrome 149 and later and if the `chrome://flags/#canvas-draw-element` flag is enabled.diff --git a/packages/docs/docs/transitions/make-html-in-canvas-presentation.mdx b/packages/docs/docs/transitions/make-html-in-canvas-presentation.mdxindex 0cc72c2e61..b90767935b 100644--- a/packages/docs/docs/transitions/make-html-in-canvas-presentation.mdx+++ b/packages/docs/docs/transitions/make-html-in-canvas-presentation.mdx@@ -233,7 +233,7 @@ const myPresentation = makeHtmlInCanvasPresentation(myShader);</details>:::warning-HTML-in-canvas requires [Chrome Canary](https://www.google.com/chrome/canary/) with `chrome://flags/#canvas-draw-element` enabled.+HTML-in-canvas requires [Google Chrome](https://www.google.com/chrome/) with `chrome://flags/#canvas-draw-element` enabled.:::## Argumentsdiff --git a/packages/docs/docs/transitions/presentations/custom-html-in-canvas.mdx b/packages/docs/docs/transitions/presentations/custom-html-in-canvas.mdxindex 59a77a0595..e28e0c92d8 100644--- a/packages/docs/docs/transitions/presentations/custom-html-in-canvas.mdx+++ b/packages/docs/docs/transitions/presentations/custom-html-in-canvas.mdx@@ -9,7 +9,7 @@ title: 'Custom HTML-in-canvas presentations'Build a presentation that runs the entering and exiting scenes through a shader using the [HTML-in-canvas](/docs/html-in-canvas) APIs.:::warning-HTML-in-canvas requires [Chrome Canary](https://www.google.com/chrome/canary/) with `chrome://flags/#canvas-draw-element` enabled in the browser.+HTML-in-canvas requires [Google Chrome](https://www.google.com/chrome/) with `chrome://flags/#canvas-draw-element` enabled in the browser.:::## When to use thisdiff --git a/packages/docs/docs/transitions/presentations/zoom-blur.mdx b/packages/docs/docs/transitions/presentations/zoom-blur.mdxindex f0bd3cf791..9d62757222 100644--- a/packages/docs/docs/transitions/presentations/zoom-blur.mdx+++ b/packages/docs/docs/transitions/presentations/zoom-blur.mdx@@ -11,7 +11,7 @@ A presentation where the outgoing scene zooms out and rotates while the incoming<Demo type="zoom-blur" />:::warning-This presentation is built with [HTML-in-canvas](/docs/remotion/html-in-canvas) and currently requires [Chrome Canary](https://www.google.com/chrome/canary/) with `chrome://flags/#canvas-draw-element` enabled. It does not work in Firefox or Safari.+This presentation is built with [HTML-in-canvas](/docs/remotion/html-in-canvas) and requires [Google Chrome](https://www.google.com/chrome/) with `chrome://flags/#canvas-draw-element` enabled. It does not work in Firefox or Safari.:::## Example@@ -85,7 +85,7 @@ Defaults to `Math.PI / 6` (30°).studio/>-For Preview, Chrome Canary with the `chrome://flags/#canvas-draw-element` flag enabled is required.+For Preview, Chrome with the `chrome://flags/#canvas-draw-element` flag enabled is required.## See alsodiff --git a/packages/docs/docs/transitions/presentations/zoom-in-out.mdx b/packages/docs/docs/transitions/presentations/zoom-in-out.mdxindex b2ef6e0432..a34a4f46dd 100644--- a/packages/docs/docs/transitions/presentations/zoom-in-out.mdx+++ b/packages/docs/docs/transitions/presentations/zoom-in-out.mdx@@ -11,7 +11,7 @@ A presentation where the outgoing scene zooms in toward the viewer and crossfade<Demo type="zoom-in-out" />:::warning-This presentation is built with [HTML-in-canvas](/docs/remotion/html-in-canvas) and currently requires [Chrome Canary](https://www.google.com/chrome/canary/) with `chrome://flags/#canvas-draw-element` enabled. It does not work in Firefox or Safari.+This presentation is built with [HTML-in-canvas](/docs/remotion/html-in-canvas) and requires [Google Chrome](https://www.google.com/chrome/) with `chrome://flags/#canvas-draw-element` enabled. It does not work in Firefox or Safari.:::## Example@@ -79,7 +79,7 @@ const BasicTransition = () => {studio/>-For Preview, Chrome Canary with the `chrome://flags/#canvas-draw-element` flag enabled is required.+For Preview, Chrome with the `chrome://flags/#canvas-draw-element` flag enabled is required.## Creditsdiff --git a/packages/transitions/src/html-in-canvas-presentation.tsx b/packages/transitions/src/html-in-canvas-presentation.tsxindex 30c35beca0..d569a82517 100644--- a/packages/transitions/src/html-in-canvas-presentation.tsx+++ b/packages/transitions/src/html-in-canvas-presentation.tsx@@ -25,7 +25,7 @@ export const HtmlInCanvasPresentation = <}) => {if (!HtmlInCanvas.isSupported()) {throw new Error(- 'HTML in Canvas is not supported. Open this page in Chrome Canary with chrome://flags/#canvas-draw-element enabled.',+ 'HTML in Canvas is not supported. Open this page in Chrome with chrome://flags/#canvas-draw-element enabled.',);}