Skip to content

🎥 Make videos programmatically with React

@remotion/web-renderer: Standardize HTML-in-canvas copy and sync docs

Jonny Burger0956c43628fe
diff --git a/packages/cli/src/config/index.ts b/packages/cli/src/config/index.ts
index f965fa62b6..56274c5266 100644
--- a/packages/cli/src/config/index.ts
+++ b/packages/cli/src/config/index.ts
@@ -187,7 +187,7 @@ declare global {
enabled: boolean,
) => void;
/**
- * Allow the experimental HTML-in-Canvas capture path in Studio client-side renders.
+ * Allow the experimental HTML-in-canvas capture path in Studio client-side renders.
* @default false
*/
readonly setAllowHtmlInCanvasEnabled: (enabled: boolean) => void;
diff --git a/packages/docs/docs/client-side-rendering/html-in-canvas.mdx b/packages/docs/docs/client-side-rendering/html-in-canvas.mdx
index be94dd0d23..4de4e7c235 100644
--- a/packages/docs/docs/client-side-rendering/html-in-canvas.mdx
+++ b/packages/docs/docs/client-side-rendering/html-in-canvas.mdx
@@ -1,7 +1,8 @@
---
image: /generated/articles-docs-client-side-rendering-html-in-canvas.png
+title: 'HTML-in-canvas'
crumb: 'Client-side rendering'
-sidebar_label: HTML in Canvas
+sidebar_label: HTML-in-canvas
---
:::warning
@@ -9,11 +10,11 @@ Experimental feature - expect bugs and breaking changes at any time.
[Track progress on GitHub](https://github.com/remotion-dev/remotion/issues/5913) and discuss in the [`#web-renderer`](https://remotion.dev/discord) channel on Discord.
:::
-# HTML in Canvas<AvailableFrom v="4.0.447" />
+# HTML-in-canvas<AvailableFrom v="4.0.447" />
-On supported Chromium-based browsers, [`@remotion/web-renderer`](/docs/web-renderer) can optionally capture full frames using the experimental [HTML-in-Canvas](https://github.com/WICG/html-in-canvas) APIs.
+On supported Chromium-based browsers, [`@remotion/web-renderer`](/docs/web-renderer) can optionally capture full frames using the experimental [HTML-in-canvas](https://github.com/WICG/html-in-canvas) APIs.
-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).
+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).
## Enabling
@@ -38,7 +39,7 @@ await renderStillOnWeb({
### In the Studio
-With [client-side rendering enabled](/docs/client-side-rendering), open the render modal, go to the `Other` tab, and turn on `Allow HTML-in-Canvas`. The initial value comes from your config and CLI defaults (below).
+With [client-side rendering enabled](/docs/client-side-rendering), open the render modal, go to the `Other` tab, and turn on `Allow HTML-in-canvas`. The initial value comes from your config and CLI defaults (below).
### As the Studio default
@@ -60,23 +61,23 @@ See [`setAllowHtmlInCanvasEnabled()`](/docs/config#setallowhtmlincanvasenabled)
<Options id="allow-html-in-canvas" />
-## Check if HTML in Canvas was used
+## Check if HTML-in-canvas was used
-If HTML in Canvas was used, you will see a warning in the browser console:
+If HTML-in-canvas was used, you will see a warning in the browser console:
```
-Using Chromium experimental HTML-in-Canvas (drawElementImage) for this frame. Pixels may differ from the built-in DOM composer. Set allowHtmlInCanvas: false to force software rasterization. See https://github.com/WICG/html-in-canvas
+Using Chromium experimental HTML-in-canvas (drawElementImage) for this frame. Pixels may differ from the built-in DOM composer. Set allowHtmlInCanvas: false to force software rasterization. See https://github.com/WICG/html-in-canvas
```
-If HTML-in-Canvas is available, and allowed, but not used, a warning will be printed:
+If HTML-in-canvas is available, and allowed, but not used, a warning will be printed:
```
-Not using html-in-canvas: drawElementImage is available but canvas.requestPaint() is missing. Use a Chromium version that ships requestPaint.
+Not 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).
-If HTML-in-Canvas is not available, or not allowed, no warning will be printed.
+If HTML-in-canvas is not available, or not allowed, no warning will be printed.
## Compatibility
@@ -94,7 +95,7 @@ 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 needs to be explicitly enabled as of time of writing in April 2026.
## See also
diff --git a/packages/docs/docs/web-renderer/render-media-on-web.mdx b/packages/docs/docs/web-renderer/render-media-on-web.mdx
index f4f5a5b0ad..3cfc831470 100644
--- a/packages/docs/docs/web-renderer/render-media-on-web.mdx
+++ b/packages/docs/docs/web-renderer/render-media-on-web.mdx
@@ -93,7 +93,7 @@ Specify a single frame (passing a `number`) or a range of frames (passing a tupl
_number_
-<Option id="scale" />
+<Options id="scale" />
### `onProgress?`
@@ -241,7 +241,7 @@ See [Cancelling renders](/docs/client-side-rendering/cancellation) for more deta
_number | null_
-<Option id="media-cache-size-in-bytes" />
+<Options id="media-cache-size-in-bytes" />
### `onArtifact?`
@@ -293,13 +293,13 @@ See [Telemetry in client-side rendering](/docs/client-side-rendering/telemetry)
_default `true`_
-<Option id="is-production" />
+<Options id="is-production" />
### `allowHtmlInCanvas?`<AvailableFrom v="4.0.447" />
_boolean_
-<Option id="allow-html-in-canvas" />
+<Options id="allow-html-in-canvas" />
## Return value
diff --git a/packages/docs/docs/web-renderer/render-still-on-web.mdx b/packages/docs/docs/web-renderer/render-still-on-web.mdx
index 072352cce3..a684d89506 100644
--- a/packages/docs/docs/web-renderer/render-still-on-web.mdx
+++ b/packages/docs/docs/web-renderer/render-still-on-web.mdx
@@ -83,7 +83,7 @@ You cannot use [`getInputProps()`](/docs/get-input-props) to read input props in
_number_
-<Option id="scale" />
+<Options id="scale" />
### `delayRenderTimeoutInMilliseconds?`
@@ -139,7 +139,7 @@ See [Cancelling renders](/docs/client-side-rendering/cancellation) for more deta
_number | null_
-<Option id="media-cache-size-in-bytes" />
+<Options id="media-cache-size-in-bytes" />
### `onArtifact?`
@@ -165,13 +165,13 @@ See [Telemetry in client-side rendering](/docs/client-side-rendering/telemetry)
_default `true`_
-<Option id="is-production" />
+<Options id="is-production" />
### `allowHtmlInCanvas?`<AvailableFrom v="4.0.447" />
_boolean_
-<Option id="allow-html-in-canvas" />
+<Options id="allow-html-in-canvas" />
## Return value
diff --git a/packages/docs/src/components/Options.tsx b/packages/docs/src/components/Options.tsx
index 9ff1c8520c..fc084094b9 100644
--- a/packages/docs/src/components/Options.tsx
+++ b/packages/docs/src/components/Options.tsx
@@ -27,5 +27,3 @@ export const Options: React.FC<{
return option.description(cli ? 'cli' : 'ssr') as JSX.Element;
};
-
-export const Option = Options;
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index e7027214cb..4157ae9e12 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -818,6 +818,15 @@ export const articles = [
noAi: false,
slug: 'client-side-rendering/how-it-works',
},
+ {
+ id: 'client-side-rendering/html-in-canvas',
+ title: 'HTML-in-canvas',
+ relativePath: 'docs/client-side-rendering/html-in-canvas.mdx',
+ compId: 'articles-docs-client-side-rendering-html-in-canvas',
+ crumb: 'Client-side rendering',
+ noAi: false,
+ slug: 'client-side-rendering/html-in-canvas',
+ },
{
id: 'client-side-rendering/index',
title: 'Client-side rendering',
@@ -854,15 +863,6 @@ export const articles = [
noAi: false,
slug: 'client-side-rendering/telemetry',
},
- {
- id: 'client-side-rendering/html-in-canvas',
- title: 'HTML in Canvas<AvailableFrom v="4.0.447" />',
- relativePath: 'docs/client-side-rendering/html-in-canvas.mdx',
- compId: 'articles-docs-client-side-rendering-html-in-canvas',
- crumb: 'Client-side rendering',
- noAi: false,
- slug: 'client-side-rendering/html-in-canvas',
- },
{
id: 'clipper',
title: '<Experimental.Clipper>',
diff --git a/packages/docs/src/theme/MDXComponents.js b/packages/docs/src/theme/MDXComponents.js
index 1df14206dd..5e2ef0613b 100644
--- a/packages/docs/src/theme/MDXComponents.js
+++ b/packages/docs/src/theme/MDXComponents.js
@@ -13,7 +13,7 @@ import {
} from '../components/AvailableFrom';
import {CompatibilityTable} from '../components/CompatibilityTable';
import {Credits} from '../components/Credits';
-import {Option, Options} from '../components/Options';
+import {Options} from '../components/Options';
import {SuggestedPrompts} from '../components/SuggestedPrompts';
import {TsType} from '../components/TsType';
import RawMarkdownCarrier from './RawMarkdownCarrier/index';
@@ -29,7 +29,6 @@ export default {
MinNodeVersion,
MinBunVersion,
Options,
- Option,
Credits,
YouTube,
Installation,
diff --git a/packages/docs/static/generated/articles-docs-client-side-rendering-html-in-canvas.png b/packages/docs/static/generated/articles-docs-client-side-rendering-html-in-canvas.png
index f7be13cff6..5b03ddce8f 100644
Binary files a/packages/docs/static/generated/articles-docs-client-side-rendering-html-in-canvas.png and b/packages/docs/static/generated/articles-docs-client-side-rendering-html-in-canvas.png differ
diff --git a/packages/renderer/src/options/allow-html-in-canvas.tsx b/packages/renderer/src/options/allow-html-in-canvas.tsx
index eaa5b8bc28..3681846e2a 100644
--- a/packages/renderer/src/options/allow-html-in-canvas.tsx
+++ b/packages/renderer/src/options/allow-html-in-canvas.tsx
@@ -5,21 +5,21 @@ let allowHtmlInCanvasEnabled = false;
const cliFlag = 'allow-html-in-canvas' as const;
export const allowHtmlInCanvasOption = {
- name: 'Allow HTML-in-Canvas for client-side rendering',
+ name: 'Allow HTML-in-canvas for client-side rendering',
cliFlag,
description: () => (
<>
When client-side rendering is enabled in the Studio, allow the
- experimental Chromium HTML-in-Canvas API to be used for capturing frames.
+ experimental Chromium HTML-in-canvas API to be used for capturing frames.
See{' '}
- <a href="https://www.remotion.dev/docs/client-side-rendering/html-in-canvas">
- HTML in Canvas docs
+ <a href="/docs/client-side-rendering/html-in-canvas">
+ HTML-in-canvas docs
</a>
.
</>
),
ssrName: null,
- docLink: 'https://www.remotion.dev/docs/config#setallowhtmlincanvasenabled',
+ docLink: 'https://www.remotion.dev/docs/client-side-rendering/html-in-canvas',
type: false as boolean,
getValue: ({commandLine}) => {
if (commandLine[cliFlag] !== null) {
diff --git a/packages/studio/src/components/RenderModal/WebRenderModalAdvanced.tsx b/packages/studio/src/components/RenderModal/WebRenderModalAdvanced.tsx
index 494f08a6a2..a8187c273c 100644
--- a/packages/studio/src/components/RenderModal/WebRenderModalAdvanced.tsx
+++ b/packages/studio/src/components/RenderModal/WebRenderModalAdvanced.tsx
@@ -171,7 +171,7 @@ export const WebRenderModalAdvanced: React.FC<WebRenderModalAdvancedProps> = ({
<div style={optionRow}>
<div style={label}>
- Allow HTML-in-Canvas <Spacing x={0.5} />
+ Allow HTML-in-canvas <Spacing x={0.5} />
<OptionExplainerBubble id="allowHtmlInCanvasOption" />
</div>
<div style={rightRow}>
diff --git a/packages/web-renderer/src/render-media-on-web.tsx b/packages/web-renderer/src/render-media-on-web.tsx
index f7f1e61cc5..89ace8234e 100644
--- a/packages/web-renderer/src/render-media-on-web.tsx
+++ b/packages/web-renderer/src/render-media-on-web.tsx
@@ -196,12 +196,12 @@ const internalRenderMediaOnWeb = async <
if (outcome.native) {
Internals.Log.warn(
{logLevel, tag: '@remotion/web-renderer'},
- 'Using Chromium experimental HTML-in-Canvas (drawElementImage) for video frames. See https://github.com/WICG/html-in-canvas',
+ 'Using Chromium experimental HTML-in-canvas (drawElementImage) for video frames. See https://github.com/WICG/html-in-canvas',
);
} else if (outcome.shouldWarn) {
Internals.Log.warn(
{logLevel, tag: '@remotion/web-renderer'},
- `Not using html-in-canvas: ${outcome.reason}`,
+ `Not using HTML-in-canvas: ${outcome.reason}`,
);
}
};
diff --git a/packages/web-renderer/src/render-still-on-web.tsx b/packages/web-renderer/src/render-still-on-web.tsx
index 0c55340996..a565336788 100644
--- a/packages/web-renderer/src/render-still-on-web.tsx
+++ b/packages/web-renderer/src/render-still-on-web.tsx
@@ -82,12 +82,12 @@ async function internalRenderStillOnWeb<
if (outcome.native) {
Internals.Log.warn(
{logLevel, tag: '@remotion/web-renderer'},
- 'Using Chromium experimental HTML-in-Canvas (drawElementImage) for this frame. Pixels may differ from the built-in DOM composer. Set allowHtmlInCanvas: false to force software rasterization. See https://github.com/WICG/html-in-canvas',
+ 'Using Chromium experimental HTML-in-canvas (drawElementImage) for this frame. Pixels may differ from the built-in DOM composer. Set allowHtmlInCanvas: false to force software rasterization. See https://github.com/WICG/html-in-canvas',
);
} else if (outcome.shouldWarn) {
Internals.Log.warn(
{logLevel, tag: '@remotion/web-renderer'},
- `Not using html-in-canvas: ${outcome.reason}`,
+ `Not using HTML-in-canvas: ${outcome.reason}`,
);
}
};
diff --git a/packages/web-renderer/src/take-screenshot.ts b/packages/web-renderer/src/take-screenshot.ts
index e037035c1b..e31958d0b3 100644
--- a/packages/web-renderer/src/take-screenshot.ts
+++ b/packages/web-renderer/src/take-screenshot.ts
@@ -55,7 +55,7 @@ export const createLayer = async ({
});
Internals.Log.verbose(
{logLevel, tag: '@remotion/web-renderer'},
- 'html-in-canvas capture failed, falling back to software compose',
+ 'HTML-in-canvas capture failed, falling back to software compose',
err,
);
}