Skip to main content
Browse the knowledge hub

PatchCut videos in Docusaurus

For product and developer documentation teams: use an iframe in an MDX page you control. No PatchCut plugin or native Docusaurus integration is required.

Use an MDX page and check your site policy

Docusaurus supports JSX inside MDX. Use a .mdx page, or confirm your Markdown configuration uses MDX rather than CommonMark. The sample uses JSX attributes and a style object; plain HTML attribute syntax is not interchangeable.

If your deployment sends a Content-Security-Policy header, its frame-src policy must permit the actual PatchCut origin in your copied URL. Ask the site maintainer to approve that origin rather than allowing every frame source. PatchCut’s own domain restrictions must also permit your published site.

Copy the complete rolling player URL

Publish your video and open Visibility → Embed Studio. Choose Rolling for maintained walkthroughs and copy its complete URL, including the workspace parameter. Do not replace it with a media-file URL or guess a slug.

A static public documentation page should not contain workspace API keys or private playback passes. For private lessons, your application must authenticate viewers, authorise access and ask for short-lived passes on its server; a static Docusaurus build does not provide that flow by itself.

Add the iframe to your MDX article

Replace src in this example with your copied URL and give the frame a descriptive title. The example reserves a 16:9 area for landscape footage; change the ratio for a portrait or square video. JSX uses allowFullScreen and an object for style.

Build and publish your documentation normally. Add a normal watch-page link nearby for visitors whose browser or network blocks framed content. You do not need to load the PatchCut player script for a basic iframe.

<iframe
  src="https://patchcut.com/embed/your-video-slug?org=your-workspace-handle"
  title="Product walkthrough"
  width="100%"
  style={{ aspectRatio: '16 / 9', height: 'auto', border: 0 }}
  allow="autoplay; fullscreen; picture-in-picture"
  allowFullScreen
/>

Publish future video revisions in PatchCut

Publish revisions in PatchCut, not in the article editor. A rolling embed loads the current live release on its next playback; an in-progress watch is not interrupted. A pinned embed keeps its chosen release until you explicitly re-target it. Keep the complete embed URL unchanged.

New footage still needs uploading and processing before it can be used. Publishing the timeline does not render a replacement video file. A downloaded MP4 is separate and does not update with your embed.

A video-only revision does not require a documentation rebuild while the rolling embed URL remains the same. Changes to the article or its iframe settings still follow your usual Docusaurus build and deployment process.

Test the deployed page, not only localhost

Open the published article as a visitor, not just in the editor preview. Check playback, sound after a tap, captions if available, fullscreen and the layout on a phone. Then publish a small revision in PatchCut and start a fresh playback from the same article; confirm the rolling embed shows that release.

This is a setup guide, not a certification of your installation. Account settings, content security policies and browser restrictions can affect playback. Do not put a workspace API key or a long-lived private pass in article source.

Test your production and staging domains separately. Browser console frame-policy errors point to site security configuration; an unavailable player may instead mean an unpublished video, an access restriction or a retired pinned release.

Official guidance and next steps

Docusaurus’s MDX documentation describes JSX syntax and the difference from CommonMark. For clickable titles, host events or private playback, use the existing embedding and developer guides; those require additional setup beyond this iframe.