🎥 Make videos programmatically with React
Docs: Add Canvas Capture documentation
Jonny Burger1da37e1e85c6
diff --git a/packages/docs/docs/canvas-capture/index.mdx b/packages/docs/docs/canvas-capture/index.mdxnew file mode 100644index 0000000000..0c0dd622f4--- /dev/null+++ b/packages/docs/docs/canvas-capture/index.mdx@@ -0,0 +1,12 @@+---+image: /generated/articles-docs-canvas-capture-index.png+title: Canvas Capture+---++# Canvas Capture++Remotion Canvas Capture is a high-fidelity webpage recorder which leverages HTML-in-canvas.++It can record content at a higher resolution than the native display resolution.++Perfect for product demos showing closeups of UI.diff --git a/packages/docs/docs/canvas-capture/installation.mdx b/packages/docs/docs/canvas-capture/installation.mdxnew file mode 100644index 0000000000..6c403f2a48--- /dev/null+++ b/packages/docs/docs/canvas-capture/installation.mdx@@ -0,0 +1,67 @@+---+image: /generated/articles-docs-canvas-capture-installation.png+title: Install Canvas Capture+sidebar_label: Installation+---++# Install Canvas Capture++> Tip: Copy the URL of this page into an agent to let it install it for you.++Canvas Capture currently requires an Apple Silicon Mac, [Bun](https://bun.com/) and a checkout of the Remotion repository.++## Install the dependencies++From the root of the Remotion repository, install the dependencies:++```bash title="Terminal"+bun install+```++## Install Chrome for Testing++Canvas Capture uses Chrome for Testing `150.0.7842.0` at revision `r1631007`. This is the exact version known to support the required HTML-in-canvas API.++Install the browser using the bundled script:++```bash title="Terminal"+.agents/skills/install-canvas-capture-browser/scripts/install-browser.sh \+ --install-app "$HOME/Applications/Recorder Chrome.app"+```++This browser does not receive security updates. Only use it with websites you trust.++## Build the extension++Build Canvas Capture and copy it to a directory outside the repository:++```bash title="Terminal"+.agents/skills/canvas-capture-extension/scripts/rebuild-extension.sh \+ --repo "$PWD" \+ --install-dir "$HOME/Applications/Remotion Canvas Capture Extension" \+ --browser-executable "$HOME/Applications/Recorder Chrome.app/Contents/MacOS/Google Chrome for Testing"+```++Keeping the extension outside the repository prevents it from breaking when the checkout or worktree is deleted.++## Launch the browser++Launch the pinned browser with the HTML-in-canvas API enabled:++```bash title="Terminal"+"$HOME/Applications/Recorder Chrome.app/Contents/MacOS/Google Chrome for Testing" \+ --user-data-dir="$HOME/Library/Application Support/Chrome for Testing Canvas Capture r1631007" \+ --enable-features=CanvasDrawElement \+ --enable-blink-features=CanvasDrawElement \+ --disable-component-update \+ --no-first-run \+ --no-default-browser-check+```++## Load the extension++Open `chrome://extensions`, enable Developer mode and select Load unpacked.++Choose `$HOME/Applications/Remotion Canvas Capture Extension`.++Open a webpage and click the Remotion Canvas Capture extension icon to start recording.diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.tsindex 8515f217fa..03e4a8385f 100644--- a/packages/docs/sidebars.ts+++ b/packages/docs/sidebars.ts@@ -1750,6 +1750,11 @@ const sidebars: SidebarsConfig = {href: '/docs/recorder',label: 'Recorder',},+ {+ type: 'link',+ href: '/docs/canvas-capture',+ label: 'Canvas Capture',+ },{type: 'html',value:@@ -1967,6 +1972,17 @@ const sidebars: SidebarsConfig = {],},],+ canvasCaptureSidebar: [+ {+ type: 'category',+ label: 'Canvas Capture',+ link: {+ type: 'doc',+ id: 'canvas-capture/index',+ },+ items: ['canvas-capture/installation'],+ },+ ],};export default sidebars;diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.tsindex 03c26b171c..a492a185f7 100644--- a/packages/docs/src/data/articles.ts+++ b/packages/docs/src/data/articles.ts@@ -575,6 +575,24 @@ export const articles = [noAi: false,slug: 'cancel-render',},+ {+ id: 'canvas-capture/index',+ title: 'Canvas Capture',+ relativePath: 'docs/canvas-capture/index.mdx',+ compId: 'articles-docs-canvas-capture-index',+ crumb: null,+ noAi: false,+ slug: 'canvas-capture/index',+ },+ {+ id: 'canvas-capture/installation',+ title: 'Install Canvas Capture',+ relativePath: 'docs/canvas-capture/installation.mdx',+ compId: 'articles-docs-canvas-capture-installation',+ crumb: null,+ noAi: false,+ slug: 'canvas-capture/installation',+ },{id: 'canvasimage',title: '<CanvasImage>',diff --git a/packages/docs/static/generated/articles-docs-canvas-capture-index.png b/packages/docs/static/generated/articles-docs-canvas-capture-index.pngnew file mode 100644index 0000000000..c72b8b7a64Binary files /dev/null and b/packages/docs/static/generated/articles-docs-canvas-capture-index.png differdiff --git a/packages/docs/static/generated/articles-docs-canvas-capture-installation.png b/packages/docs/static/generated/articles-docs-canvas-capture-installation.pngnew file mode 100644index 0000000000..0e9dbed219Binary files /dev/null and b/packages/docs/static/generated/articles-docs-canvas-capture-installation.png differdiff --git a/packages/docs/vercel.ts b/packages/docs/vercel.tsindex 9420bafd18..e707c8ad11 100644--- a/packages/docs/vercel.ts+++ b/packages/docs/vercel.ts@@ -377,6 +377,9 @@ export const config: VercelConfig = {permanent: false,}),routes.redirect('/recorder', '/docs/recorder', {permanent: false}),+ routes.redirect('/canvas-capture', '/docs/canvas-capture', {+ permanent: false,+ }),routes.redirect('/install-whisper-cpp', '/docs/install-whisper-cpp', {permanent: false,}),