Video Embedding
DocumenterVitepress automatically converts Markdown image syntax to HTML5 video tags when the file extension indicates a video format.
Basic video
Input
Output
Alt Attribute as Title
Input
Output
Title Attribute
Input
Output
Using @raw html Blocks
@raw html blocks preserve HTML content exactly as written, without any markdown processing or conversion.
Input
```@raw html
<video src="./my_video.mp4" controls="controls" title="Auto play video" autoplay="autoplay"></video>
```Output
Supported Video Formats
DocumenterVitepress recognizes the following video formats:
.mp4- MPEG-4 (best browser support).webm- WebM (modern, widely supported).ogg- Ogg.ogv- Ogg Video.m4v- MPEG-4 Video (Apple).avi- AVI (limited browser support).mov- QuickTime (limited browser support).mkv- Matroska (limited browser support)
TIP
For best cross-browser compatibility, use .mp4 or .webm formats.
WARNING
Formats marked with "limited browser support" may not play in all browsers. Test your videos across different browsers if using these formats.