---
title: "video"
description: "A video: a store file, or an external URL."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# video

## Where it sits

| Body | In the body | Inside its texts |
| --- | --- | --- |
| The store's home | Yes | Yes |
| A custom page | Yes | Yes |
| A product's page | Yes | Yes |
| An event's page | Yes | Yes |
| A portfolio's page | Yes | Yes |
| A lesson | Yes | Yes |
| An article | Yes | Yes |

A text holds it as a `<block type="video" props="…"></block>` element: its props are those below but `type`, which the element's own `type` names.

See [Bodies](/overview/blocks#bodies) for how a body holds its blocks.

## Props

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The block's id, unique within its body. |
| `type` | `"video"` | Yes | The block's type. |
| `src` | `string` | No | An external URL, when no `fileId` names a store file. Defaults to `""`. |
| `width` | `number` | No | Its width in pixels. |
| `height` | `number` | No | Its height in pixels. |
| `duration` | `number` | No | Its length in seconds. |
| `startTime` | `number` | No | Where it starts playing, in seconds. |
| `fileId` | `string` | No | A store file's id, listed in the read's `files`. |
| `caption` | `string` | No | A caption under it. |
| `poster` | `string` | No | The poster's external URL, when no `posterFileId` names one. |
| `posterFileId` | `string` | No | The poster's store file id. |
| `size` | `"small" or "medium" or "full"` | No | How wide it shows: `small`, `medium` or `full`. |
| `fit` | `"contain" or "cover"` | No | Whether the media is cropped to its frame (`cover`) or fits inside it (`contain`). |
| `align` | `"start" or "center" or "end"` | No | How its content aligns: `start`, `center` or `end`. |
| `autoplay` | `boolean` | No | Whether it plays, muted, as soon as it shows. |
| `loop` | `boolean` | No | Whether it starts over when it ends. |
| `hidden` | `boolean` | No | Whether the block is hidden: it, and every block it holds, doesn't show. |

## JSON Schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The block's id, unique within its body."
    },
    "type": {
      "type": "string",
      "const": "video",
      "description": "The block's type."
    },
    "src": {
      "default": "",
      "type": "string",
      "description": "An external URL, when no `fileId` names a store file."
    },
    "width": {
      "type": "number",
      "description": "Its width in pixels."
    },
    "height": {
      "type": "number",
      "description": "Its height in pixels."
    },
    "duration": {
      "type": "number",
      "description": "Its length in seconds."
    },
    "startTime": {
      "type": "number",
      "description": "Where it starts playing, in seconds."
    },
    "fileId": {
      "type": "string",
      "description": "A store file's id, listed in the read's `files`."
    },
    "caption": {
      "type": "string",
      "description": "A caption under it."
    },
    "poster": {
      "type": "string",
      "description": "The poster's external URL, when no `posterFileId` names one."
    },
    "posterFileId": {
      "type": "string",
      "description": "The poster's store file id."
    },
    "size": {
      "type": "string",
      "enum": [
        "small",
        "medium",
        "full"
      ],
      "description": "How wide it shows: `small`, `medium` or `full`."
    },
    "fit": {
      "type": "string",
      "enum": [
        "contain",
        "cover"
      ],
      "description": "Whether the media is cropped to its frame (`cover`) or fits inside it (`contain`)."
    },
    "align": {
      "type": "string",
      "enum": [
        "start",
        "center",
        "end"
      ],
      "description": "How its content aligns: `start`, `center` or `end`."
    },
    "autoplay": {
      "type": "boolean",
      "description": "Whether it plays, muted, as soon as it shows."
    },
    "loop": {
      "type": "boolean",
      "description": "Whether it starts over when it ends."
    },
    "hidden": {
      "type": "boolean",
      "description": "Whether the block is hidden: it, and every block it holds, doesn't show."
    }
  },
  "required": [
    "id",
    "type"
  ],
  "description": "A video: a store file, or an external URL.",
  "additionalProperties": false
}
```

Source: https://docs.sherpo.io/overview/blocks/video/index.mdx
