Video Slide Layout
The video layout is used to display a video as the background on the slide. It provides a large video area with content overlayed on top, perfect for creating engaging presentations with multimedia content.
Basic Video Layout
---layout: videovideo: "path/to/your/video.mp4"---
# Your slide title
Your content here will appear over the video background.Video Properties
You can control video playback behavior using these front matter properties:
video- Path to the video file (relative to workspace or absolute URL)controls- Show video controls (default:false). Without controls, the video is a background video, which is muted, loops and plays inline.autoplay- Auto-play the video (default:truefor background videos,falsewhencontrolsistrue). A video that auto-plays is muted.autoPlayis supported as an alias.loop- Loop a video with controls (default:false)muted- Mute a video with controls that doesn’t auto-play (default:false)playsInline- Play a video with controls inline on mobile devices (default:false)playbackRate- Playback speed of the video (default:1)
See the front matter reference for all the properties.
Background Video (Default)
By default, videos in the video layout play as background elements:
---layout: videovideo: ".demo/assets/presentation-video.mp4"---
# Welcome to Demo Time
This content appears over the video background.Interactive Video with Controls
For videos that users should interact with, enable controls:
---layout: videovideo: ".demo/assets/tutorial-video.mp4"controls: trueautoplay: falseloop: falsemuted: false---
# Video Tutorial
Watch the video below to learn more.Video Sources
Local Video Files
---layout: videovideo: ".demo/assets/my-video.mp4"---Remote Video URLs
---layout: videovideo: "https://example.com/path/to/video.mp4"---Relative Paths
---layout: videovideo: "../videos/presentation.mp4"---Best Practices
Performance
- Keep video files under 50MB for smooth playback
- Use compressed video formats (MP4 with H.264)
- Consider using lower resolution for background videos
Accessibility
- Always provide alternative content for users who cannot see videos
- Include captions for videos with audio content
- Use
mutedfor background videos to prevent unexpected audio