Updated June 16, 2026

Can I embed a video in a canvas?

Quick answer

Yes. Reference a local video file from a <video> (or its <source>) in an HTML canvas — e.g. <video controls><source src="./repro.mp4"></video> — and when your agent pushes the canvas it uploads the file to Drafty's CDN and rewrites the link to the hosted URL, exactly like it already does for images. The video plays inline on the canvas, so a reproduction clip or screen recording lives right next to the thing it shows. Supported formats are mp4, webm, and mov, up to 100 MB per file. The on-disk file keeps its local link, so it stays small and re-pushing unchanged media re-uses what's already hosted.

A screenshot shows the bug sitting still. A short clip shows it happening. Drafty hosts both: drop a <video> into an HTML canvas and your agent uploads the file and serves it from Drafty's CDN — the same thing it already does for images.

How to add one

Reference a local file from a <video> (or its <source>) in an HTML canvas, with the file sitting next to the HTML:

<video controls>
  <source src="./repro.mp4" type="video/mp4">
</video>

On push, the agent uploads repro.mp4 and rewrites the link to the hosted URL in the published page. A poster="./thumb.png" thumbnail is uploaded the same way. The clip plays inline, right next to whatever it's showing.

Formats and size

mp4, webm, and mov, up to 100 MB per file — mp4 plays most reliably everywhere. A short reproduction clip is usually a few megabytes; for longer footage, trim or compress it first.

How the hosting works

The file is content-addressed, so re-pushing an unchanged video re-uses the copy that's already up rather than uploading again. The bytes go straight from your machine to storage — they don't pass through a size-limited middle step — so larger clips upload cleanly. Your on-disk file keeps its local link, so the canvas source stays small and easy for an agent to read and edit.

Privacy

A private canvas stays private — only people you invite can open it. The uploaded file itself sits at an unguessable URL, the same model Drafty uses for images. Treat hosted media as an unlisted link, and keep genuinely sensitive footage off shared canvases.

Video needs the <video> tag, so its home is an HTML canvas — Markdown has no video syntax. Starting from Markdown and want a clip inline? Ask your agent to make it an HTML canvas.

Get started

Frequently asked

How do I add one?
Put a <video> in an HTML canvas pointing at a local file: <video controls><source src="./demo.mp4" type="video/mp4"></video>, with the file sitting next to the HTML. On push, the agent uploads it and swaps the local path for the hosted URL in the published page. A poster image works too — poster="./thumb.png" is uploaded the same way.
What formats and sizes are supported?
mp4, webm, and mov, up to 100 MB per file. mp4 is the safest bet for playing everywhere. For longer footage, trim or compress it — a short reproduction clip is usually a few megabytes.
Where is the video hosted?
On Drafty's CDN, content-addressed by the file's contents. The bytes upload straight from your machine to storage — they don't pass through any size-limited middle step — so even larger clips go up cleanly. Re-pushing the same file is a no-op that re-uses the existing copy.
Is a video on a private canvas private?
The canvas itself stays private — only people you invite can open it. The uploaded file sits at an unguessable URL, the same model Drafty uses for images. Treat hosted media as you would any unlisted link, and keep genuinely sensitive footage off shared canvases.
Can I write a video into a Markdown canvas?
Markdown has no video syntax, so the reliable home for video is an HTML canvas, where the <video> tag renders as written. If you're starting from Markdown and want inline video, ask your agent to make it an HTML canvas.

Related