# Video

Video elements play a video file inline on the slide. Click **Video** in the top toolbar to insert.

## Adding a video

Two sources, both via the inspector:

- **Upload** — click "Upload" or drop a file. Accepted: MP4, WebM. Files store in your org's bucket; a signed URL goes into `src`.
- **Paste URL** — any HTTPS-served video URL works (CDN, Vimeo direct file, etc.). YouTube/Vimeo *embed* URLs need to use the [Embed element](/docs/build/slides/elements/embed) instead — those aren't direct video files.

## Inspector

<!-- omitted: ParamsTable -->

## Autoplay rules

Browsers block videos that try to autoplay with sound. To get reliable autoplay on a slide:

```json title="autoplay-video.json"
{
  "type": "video",
  "src": "https://...",
  "autoplay": true,
  "muted": true,
  "loop": true
}
```

`autoplay: true` + `muted: true` is the only combination that survives every modern browser. If you set `autoplay: true` and leave `muted: false`, the video will load but the visitor has to manually press play.

## Common patterns

**Background video loop:**

```json
{
  "type": "video",
  "position": { "x": 0, "y": 0, "w": 1920, "h": 1080 },
  "src": "...",
  "autoplay": true,
  "muted": true,
  "loop": true
}
```

Edge-to-edge looping background. Place text/buttons on top with z-index above.

**Inline product demo:**

```json
{
  "type": "video",
  "position": { "x": 80, "y": 200, "w": 1100, "h": 619 },
  "src": "...",
  "autoplay": false,
  "loop": false,
  "muted": false
}
```

A non-autoplay demo at 16:9 inside the content area. Visitor presses play; sound on.

## Codec recommendations

For broad compatibility, encode as:

- **H.264 MP4** — works everywhere
- **VP9 WebM** — better compression for the same quality if your audience is on modern browsers (Chrome, Firefox, Edge)

Avoid HEVC / H.265 for inline web playback — Safari supports it but Chrome/Firefox don't.

## Schema reference

`Video` element:

<!-- omitted: ParamsTable -->

## Read next

- [Embed](/docs/build/slides/elements/embed) — for YouTube / Vimeo iframes
- [Image](/docs/build/slides/elements/image) — for static visuals
