# Video \*

### Installation

{% hint style="info" %}
&#x20;This component is not included by default, to use it import the following package:
{% endhint %}

{% tabs %}
{% tab title="NPM" %}

```bash
$ npm i react-ult-ext-video
```

{% endtab %}

{% tab title="Yarn" %}

```
$ yarn add react-ult-ext-video
```

{% endtab %}
{% endtabs %}

### Styles

* Flexbox Styles
* View Styles
* Transform Styles

### Props

| Name                   | Type                                     | Description                                                                                                                                     |
| ---------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **accessibilityLabel** | `string`                                 | <ul><li>Alternate text to display if the image cannot be loaded or by screen readers</li></ul>                                                  |
| **authToken**          | `string`                                 | <ul><li> Authentication token to include in request (not supported on some React Native implementations)</li></ul>                              |
| **loop**               | `boolean`                                | <ul><li>Should video playback loop to beginning after it completes?</li></ul>                                                                   |
| **onBuffer**           | `() => void`                             | <ul><li>Called when the video is paused for buffering</li></ul>                                                                                 |
| **onCanPlay**          | `() => void`                             | <ul><li>Called when enough of the video has been loaded that playback is possible</li></ul>                                                     |
| **onCanPlayThrough**   | `() => void`                             | <ul><li>Called when enough of the video has been loaded that playback can proceed all the way to the end without buffering pauses</li></ul>     |
| **onEnded**            | `() => void`                             | <ul><li>Called when the video playback reaches the end</li></ul>                                                                                |
| **onError**            | `() => void`                             | <ul><li>Called when the video cannot be loaded</li></ul>                                                                                        |
| **onLoadedData**       | `(info: VideoInfo) => void`              | <ul><li>Called when the video's metadata has been loaded; returns information about the video</li></ul>                                         |
| **onLoadStart**        | `() => void`                             | <ul><li>Called when the video data is starting to load</li></ul>                                                                                |
| **onProgress**         | `(progress: VideoProgress) => void`      | <ul><li>Called periodically when the video is playing; reports progress information</li></ul>                                                   |
| **preload**            | `'auto'\|'metadata'\|'none'`             | <ul><li>Indiciates which portion of the video should be pre-loaded when the component is mounted</li></ul>                                      |
| **resizeMode**         | `'contain'\|'cover'\|'stretch'`          | <ul><li>Determines how to resize the image if its natural size does not match the size of the container</li></ul>                               |
| **showControls**       | `boolean`                                | <ul><li>Displays controls for play, pause, etc.</li></ul>                                                                                       |
| **source**             | `string \| number`                       | <ul><li>Source of video (URL) or resource <code>id</code> as resolved by <code>require()</code> for <code>react-native</code> targets</li></ul> |
| **style**              | `ViewStyleRuleSet \| ViewStyleRuleSet[]` | <ul><li>See above for supported styles</li></ul>                                                                                                |

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ult.dev/components/video.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
