# Video block

Displays a video with its thumbnail, title and description; supported providers play in place.

| | |
|---|---|
| **Type** | `video` |
| **Available in** | Messages, Modals, Home tab |

## Fields

| Field | Type | Description | Required? |
|---|---|---|---|
| `type` | String | The type of block. For a video block, `type` is always `video`. | Required |
| `alt_text` | String | A tooltip for the video. Required for accessibility. | Required |
| `author_name` | String | Author name to show. Fewer than 50 characters. | Optional |
| `block_id` | String | A unique identifier for the block. Maximum length is 255 characters. It must be unique within the message or view — a duplicate is replaced and reported as a warning. | Optional |
| `description` | [Text object](https://workstation.repzo.com/docs/developers/block-kit/objects/text-object) | Description of the video, as a `plain_text` text object. Fewer than 200 characters. | Optional |
| `provider_icon_url` | String | Icon for the video provider. | Optional |
| `provider_name` | String | The application or site the video comes from, e.g. Vimeo. | Optional |
| `title` | [Text object](https://workstation.repzo.com/docs/developers/block-kit/objects/text-object) | Video title, as a `plain_text` text object. Fewer than 200 characters. | Required |
| `title_url` | String | An https link for the title — the video's page. | Optional |
| `thumbnail_url` | String | The thumbnail image URL. | Required |
| `video_url` | String | The https URL of the video to play. | Required |

> **How Repzo Chat differs from Slack**
>
> - On the web, YouTube, Vimeo and Loom videos play in place; any other video opens in a new tab.
> - On mobile, video files (such as `.mp4`) play in the app; other links open in the in-app browser.
> - No unfurl domain or `links.embed:write` scope is needed.

## Examples

### A YouTube video

YouTube, Vimeo and Loom links play in place on the web. Use your own video's watch and embed URLs.

```json
{
  "blocks": [
    {
      "type": "video",
      "title": {
        "type": "plain_text",
        "text": "Product walkthrough"
      },
      "title_url": "https://www.youtube.com/watch?v=VIDEO_ID",
      "video_url": "https://www.youtube.com/embed/VIDEO_ID",
      "thumbnail_url": "https://picsum.photos/id/0/1280/720",
      "alt_text": "Product walkthrough video",
      "provider_name": "YouTube",
      "description": {
        "type": "plain_text",
        "text": "A five-minute tour of the new quote builder."
      }
    }
  ]
}
```

### A hosted video file

Not a supported provider, so the web opens it in a new tab and mobile plays it in the app.

```json
{
  "blocks": [
    {
      "type": "video",
      "title": {
        "type": "plain_text",
        "text": "Installing the POS Terminal X2"
      },
      "video_url": "https://videos.example.com/training/pos-x2-install.mp4",
      "thumbnail_url": "https://picsum.photos/id/2/1280/720",
      "alt_text": "Installation training video",
      "author_name": "Training team",
      "description": {
        "type": "plain_text",
        "text": "Unboxing, mounting and pairing the terminal with a receipt printer."
      }
    }
  ]
}
```

## Related

- [Blocks](https://workstation.repzo.com/docs/developers/block-kit/blocks)
- [Block Kit overview](https://workstation.repzo.com/docs/developers/block-kit)
