Skip to content

🎥 Make videos programmatically with React

docs: Point allow-html-in-canvas option at HTML in Canvas guide; reorder API docs

Jonny Burgerf570e8c7a1ff
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 5ec50740d3..f4f5a5b0ad 100644
--- a/packages/docs/docs/web-renderer/render-media-on-web.mdx
+++ b/packages/docs/docs/web-renderer/render-media-on-web.mdx
@@ -95,20 +95,6 @@ _number_
<Option id="scale" />
-### `allowHtmlInCanvas?`<AvailableFrom v="4.0.447" />
-
-_boolean_
-
-Default `false`. In the Remotion Studio, the checkbox under **Other** is initialized from [`Config.setAllowHtmlInCanvasEnabled()`](/docs/config#setallowhtmlincanvasenabled) and the [`--allow-html-in-canvas`](/docs/cli/studio#--allow-html-in-canvas) CLI flag:
-
-<Option id="allow-html-in-canvas" />
-
-When `true`, Chromium-based browsers that expose the experimental [HTML-in-Canvas](https://github.com/WICG/html-in-canvas) API (`drawElementImage`, enabled e.g. via `chrome://flags/#canvas-draw-element`) may rasterize each video frame with the browser engine instead of Remotion’s built-in DOM composer. This is usually faster but **pixels may not match** the software path.
-
-A **warning** is logged when the native path is used, or when `drawElementImage` is available but capture fails for another reason. Use `logLevel: 'warn'` or lower if you do not see these messages.
-
-Set to `false` to always use the built-in composer (for consistent pixels or when debugging differences).
-
### `onProgress?`
_function_ <TsType type="RenderMediaOnWebProgressCallback" source="@remotion/web-renderer" href="/docs/web-renderer/types#rendermediaonwebprogresscallback" />
@@ -309,6 +295,12 @@ _default `true`_
<Option id="is-production" />
+### `allowHtmlInCanvas?`<AvailableFrom v="4.0.447" />
+
+_boolean_
+
+<Option id="allow-html-in-canvas" />
+
## Return value
Returns a promise resolving to an object with the following properties:
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 7c6260bfe2..072352cce3 100644
--- a/packages/docs/docs/web-renderer/render-still-on-web.mdx
+++ b/packages/docs/docs/web-renderer/render-still-on-web.mdx
@@ -85,20 +85,6 @@ _number_
<Option id="scale" />
-### `allowHtmlInCanvas?`<AvailableFrom v="4.0.447" />
-
-_boolean_
-
-Default `false`. In the Remotion Studio, the checkbox under **Other** is initialized from [`Config.setAllowHtmlInCanvasEnabled()`](/docs/config#setallowhtmlincanvasenabled) and the [`--allow-html-in-canvas`](/docs/cli/studio#--allow-html-in-canvas) CLI flag:
-
-<Option id="allow-html-in-canvas" />
-
-When `true`, Chromium-based browsers that expose the experimental [HTML-in-Canvas](https://github.com/WICG/html-in-canvas) API (`drawElementImage`, enabled e.g. via `chrome://flags/#canvas-draw-element`) may rasterize the full composition frame with the browser engine instead of Remotion’s built-in DOM composer. This is usually faster but **pixels may not match** the software path.
-
-A **warning** is logged when the native path is used, or when `drawElementImage` is available but capture fails for another reason. Use `logLevel: 'warn'` or lower if you do not see these messages.
-
-Set to `false` to always use the built-in composer (for consistent pixels or when debugging differences).
-
### `delayRenderTimeoutInMilliseconds?`
_number_
@@ -181,6 +167,12 @@ _default `true`_
<Option id="is-production" />
+### `allowHtmlInCanvas?`<AvailableFrom v="4.0.447" />
+
+_boolean_
+
+<Option id="allow-html-in-canvas" />
+
## Return value
Returns a promise resolving to an object with the following properties:
diff --git a/packages/renderer/src/options/allow-html-in-canvas.tsx b/packages/renderer/src/options/allow-html-in-canvas.tsx
index 0035fd3294..eaa5b8bc28 100644
--- a/packages/renderer/src/options/allow-html-in-canvas.tsx
+++ b/packages/renderer/src/options/allow-html-in-canvas.tsx
@@ -10,10 +10,10 @@ export const allowHtmlInCanvasOption = {
description: () => (
<>
When client-side rendering is enabled in the Studio, allow the
- experimental Chromium HTML-in-Canvas path (<code>drawElementImage</code>)
- for capturing frames instead of the built-in DOM composer. See{' '}
- <a href="https://www.remotion.dev/docs/web-renderer/render-media-on-web">
- Web Renderer docs
+ 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>
.
</>