> From the [Strife developer docs](https://strife.app/docs/reference/fields/video). Every page is listed in [llms.txt](https://strife.app/docs/llms.txt).

# Video

The Video field lets editors embed a video in a document from a media asset, a direct URL. It stores the source, playback options, and an optional poster image as an object in the database.

#### Settings

The Video field does not feature any distinctive template-level settings beyond the standard ones. When editing a document, the field's built-in editor offers a source selector (Media or URL), quality toggle, poster image editor, and playback controls (autoplay, loop, mute, controls, start time).

> [!NOTE]
> You can find a comprehensive list of all basic settings in the 'Overview' section.

#### Define with JSON

When defining templates using JSON, this field is represented using:

* **Component Name:** `str-video`
* **Type:** `video`
* Reference ID: `str-video|video`

```json
{
  ...
  "editor": {
    "name": "str-video",
    "type": "video",
    "propertyName": "..."
  },
  ...
}
```

The value stored in the database is an object describing the selected video:

```json
{
  "source": "media",           //"media" | "url"
  "url": "...",                  //Video URL
  "quality": "high",             //"medium" (720p) or "high" (1080p) for Media source
  "poster": {                    //Optional poster image
    "src": "...",
    "alt": "",
    "width": 1366,
    "height": 768
  },
  "startTime": "0",              //Start offset in seconds
  "playing": false,              //Autoplay
  "muted": false,
  "controls": true,
  "loop": false
}
```

#### Live preview

This field does not have a default Strife Web Component. To render a video in live preview, read `url`, `poster`, and the playback flags from the stored value and render a native `<video>` element.

> [!NOTE]
> For more information on live preview and custom implementations, please refer to the [Live preview documentation](https://strife.app/docs/reference/live-preview.md).
