🎥 Make videos programmatically with React
docs: ANGLE for HtmlInCanvas+video, expand html-in-canvas skill
JonnyBurger69ed9c7fa8ab
diff --git a/packages/docs/docs/remotion/html-in-canvas.mdx b/packages/docs/docs/remotion/html-in-canvas.mdxindex 3d3e92f346..3a794052c3 100644--- a/packages/docs/docs/remotion/html-in-canvas.mdx+++ b/packages/docs/docs/remotion/html-in-canvas.mdx@@ -40,6 +40,26 @@ if (HtmlInCanvas.isHtmlInCanvasSupported()) {}```+## Video and the ANGLE renderer++If your composition includes **video** (for example [`<Video>`](/docs/media/video) from `@remotion/media`) and you use `<HtmlInCanvas>`, video will only render when Chromium uses the **ANGLE** OpenGL backend.++From the CLI:++```bash+npx remotion render --gl=angle+```++It is advised to set the default in `remotion.config.ts` so Studio and CLI renders pick it up:++```ts twoslash title="remotion.config.ts"+import {Config} from '@remotion/cli/config';+// ---cut---+Config.setChromiumOpenGlRenderer('angle');+```++See [`Config.setChromiumOpenGlRenderer()`](/docs/config#setchromiumopenglrenderer).+## API### `width`diff --git a/packages/skills/skills/remotion/rules/html-in-canvas.md b/packages/skills/skills/remotion/rules/html-in-canvas.mdindex 521f4e2778..3e62f18d60 100644--- a/packages/skills/skills/remotion/rules/html-in-canvas.md+++ b/packages/skills/skills/remotion/rules/html-in-canvas.md@@ -5,6 +5,34 @@ Renders children into a `<canvas>` so you can post-process them with the CanvasOnly works in Chrome 149+ with the `chrome://flags/#canvas-draw-element` flag enabled.Give the user a notice.+## Nesting++Do not nest `<HtmlInCanvas>` inside another `<HtmlInCanvas>`. Remotion throws:++```+<HtmlInCanvas> effects cannot be nested together. Chrome will only display the outer effect. Consider merging the effects into one if you can.+```++## Video and the ANGLE renderer++If the composition includes **video** (for example `<Video>` from `@remotion/media`) and you use `<HtmlInCanvas>`, rendering only works when Chromium uses the **ANGLE** OpenGL backend.++From the CLI:++```bash+npx remotion render --gl=angle+```++Set it as the default for Studio and CLI (advised):++```ts+import { Config } from "@remotion/cli/config";++Config.setChromiumOpenGlRenderer("angle");+```++See https://remotion.dev/docs/config#setchromiumopenglrenderer+## Basic usageBy default, draws to canvas with no effect applied: