Jamdesk Documentation logo

Videos

Learn how to embed MP4 and WebM videos in Jamdesk using Markdown or the Video component, with props for autoplay, loop, and controls.

Store .mp4 or .webm files in a /videos directory inside your project and reference them directly. Jamdesk renders an HTML5 player with controls, rounded corners, and consistent spacing.

Markdown Syntax

The same ![alt](path) pattern you use for images works for video files. Jamdesk checks the file extension and renders a video player instead of an <img loading="lazy"> tag:

![Never Gonna Give You Up](/videos/never-gonna-give-you-up.mp4)

You get a standard player with play/pause, volume, progress bar, and fullscreen. Use the <Video> component to control playback (autoplay, looping, muting).

Video Component

The <Video> component exposes HTML5 video attributes as props:

<Video src="/_jd/videos/never-gonna-give-you-up.mp4?v=mwdojjfh" title="Rick Astley" />

The title prop sets the aria-label on the video element. Screen readers announce this label. Always include one.

Props

PropTypeDefaultDescription
srcstringnoneRequired. Path to the video file.
titlestringnoneAccessibility label for screen readers.
controlsbooleantrueShow the browser's built-in player controls.
autoPlaybooleanfalseBegin playing as soon as the video is visible.
mutedbooleanfalseStart with audio muted.
loopbooleanfalseRestart from the beginning when the video ends.
widthstringnoneCSS width value (e.g., "400px", "100%").
heightstringnoneCSS height value.

GIF Replacement

A 5-second UI recording can hit 10MB as a GIF and stay under 500KB as an MP4. Replace GIFs with a silent, looping video and hide the player chrome:

<Video src="/_jd/videos/ui-demo.mp4?v=mwdojjfh" autoPlay muted loop controls={false} />

The result behaves like a GIF (plays inline, loops forever, no controls). It loads faster and stays sharp at any resolution.

Browsers block unmuted autoplay. A video with autoPlay and no muted won't play. It sits on the first frame with no error. Always set muted with autoPlay.

Supported Formats

FormatExtensionBrowser Support
MP4 (H.264).mp4All browsers, including Safari and iOS
WebM (VP9).webmChrome, Firefox, Edge. Smaller files at comparable quality

MP4 is the safe default. Every browser and device plays it. WebM produces smaller files. Safari and iOS don't play WebM. Readers on Apple devices see nothing.

Video files can be up to 100MB. Host anything longer than a few minutes on YouTube and use the <YouTube> component instead. A CDN built for video streams it faster than your docs can serve a large file.

Compress videos before committing them. Tools like FFmpeg and Handbrake cut file sizes without visible quality loss: ffmpeg -i input.mp4 -crf 28 -preset slow output.mp4

What's Next?

Images

Markdown images, dimensions, and captions

YouTube Embeds

YouTube videos and Shorts

iFrames

Vimeo, CodePen, Figma, and more