Video block
Use a video block to show a link to a hosted video or a video file. You can add a caption and set the player’s alignment, width, and aspect ratio.
Configuration
| Property | Type | Required | Default | Validation and behavior |
|---|---|---|---|---|
type | string | Yes | — | Must be video. Selects the block. |
url | string | Yes | — | At least 1 character. Links to a hosted video or video file. |
caption | string | No | None | Any text. Shown under the video. |
alignment | string | No | center | left, center, or right. Sets horizontal position. |
size | string | No | full | tiny (160 px), xs (240 px), small (320 px), medium (640 px), large (960 px), or full (100% of form width). Sets the largest player width. |
maxWidth | number | No | None; size sets the width | Pixels. When set, replaces size. |
aspectRatio | string | No | 16:9 | 16:9, 4:3, or 1:1. Sets the player shape. |
visible_if | condition array | No | None | Same conditions as fields. Shows the block when true. |
hide_if | condition array | No | None | Same conditions as fields. Hides the block when true. |
Where you can use it
Add the block to the ui array of a start page, question page, or end page. End pages accept display blocks only. Visibility conditions work on layout blocks.
A video block collects no answer, so it has no submission value.
JSON example
{
"type": "video",
"url": "https://media.example.com/videos/product-tour.mp4",
"caption": "A two-minute tour of the product",
"alignment": "center",
"size": "large",
"aspectRatio": "16:9"
}