# Video

<div align="left"><img src="https://963067965-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MIJW5nbmYRaSNWePAac%2F-MIxu2KP4MClY9gv_q2W%2F-MIxukSGedZoZeZe0IV9%2FProperty-Video.png?alt=media&#x26;token=2820790c-d121-42ff-ae73-dc746d8e5875" alt=""></div>

| Property  | Function                                                                                                                                                                                  | Type                                                                                                                                                                                                                                                           |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Fill mode | <p>Sets video fill mode<br><br><strong>Actions editor:</strong><br><code>Property > Video > Fill mode</code><br><strong>Code:</strong><br><code>widget.content.fillMode</code></p>        | <p><code>enum</code><br><br><strong>Values:</strong><br><code>Stretch</code><br><code>PreserveAspectFit</code><br><code>PreserveAspectCrop</code><br><code>Tile</code><br><code>TileVertically</code><br><code>TileHorizontally</code><br><code>Pad</code></p> |
| Autoplay  | <p>Start playback automatically<br><br><strong>Actions editor:</strong><br><code>Property > Video > Autoplay</code><br><strong>Code:</strong><br><code>widget.content.autoplay</code></p> | `bool`                                                                                                                                                                                                                                                         |
| Loop      | <p>Looping the playback<br><br><strong>Actions editor:</strong><br><code>Property > Video > Loop</code><br><strong>Code:</strong><br><code>widget.content.loop</code></p>                 | `bool`                                                                                                                                                                                                                                                         |
| Muted     | <p>Mute sound of video<br><br><strong>Actions editor:</strong><br><code>Property > Video > Muted</code><br><strong>Code:</strong><br><code>widget.content.muted</code></p>                | `bool`                                                                                                                                                                                                                                                         |
| Index     | <p>Index video<br><br><strong>Actions editor:</strong><br><code>Property > Video > Index</code><br><strong>Code:</strong><br><code>widget.content.itemIndex</code></p>                    | `int`                                                                                                                                                                                                                                                          |

## Actions

| Property     | Function                                                                                                                                                                                                    |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Play         | <p><strong>Actions editor:</strong><br><code>Actions > Common > Play</code><br><strong>Code:</strong><br><code>widget.content.script.actionPlay()</code></p>                                                |
| Stop         | <p><strong>Actions editor:</strong><br><code>Actions > Common > Stop</code><br><strong>Code:</strong><br><code>widget.content.script.actionStop()</code></p>                                                |
| Pause        | <p><strong>Actions editor:</strong><br><code>Actions > Common > Pause</code><br><strong>Code:</strong><br><code>widget.content.script.actionPause()</code></p>                                              |
| Next         | <p>Open next video<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Next</code><br><strong>Code:</strong><br><code>widget.content.script.actionListForward()</code></p>                  |
| Previous     | <p>Open previous video<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Previous</code><br><strong>Code:</strong><br><code>widget.content.script.actionListBackward()</code></p>         |
| Item index   | <p>Open video by index<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Item index</code><br><strong>Code:</strong><br><code>widget.content.script.actionItemIndex(int index)</code></p> |
| Set video    | <p><strong>Actions editor:</strong><br><code>Actions > Common > Set video</code><br><strong>Code:</strong><br><code>widget.content.script.actionSetVideo(QString video)</code></p>                          |
| Add video    | <p><strong>Actions editor:</strong><br><code>Actions > Common > Add video</code><br><strong>Code:</strong><br><code>widget.content.script.actionAddVideo(QString video)</code></p>                          |
| Clear videos | <p><strong>Actions editor:</strong><br><code>Actions > Common > Clear videos</code><br><strong>Code:</strong><br><code>widget.content.script.actionClearVideo()</code></p>                                  |

## Events

| Property   | Function                                                                                                                                                                                                 |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Play       | <p>Event when playing started<br><br><strong>Actions editor:</strong><br><code>Event > Play</code><br><strong>Code:</strong><br><code>widget.content.script.eventPlay()</code></p>                       |
| Stop       | <p>Event when playing stopped<br><br><strong>Actions editor:</strong><br><code>Event > Stop</code><br><strong>Code:</strong><br><code>widget.content.script.eventStop()</code></p>                       |
| Pause      | <p>Event when playing paused<br><br><strong>Actions editor:</strong><br><code>Event > Pause</code><br><strong>Code:</strong><br><code>widget.content.script.eventPause()</code></p>                      |
| Next       | <p>Event when next video is displayed<br><br><strong>Actions editor:</strong><br><code>Event > Next</code><br><strong>Code:</strong><br><code>widget.content.script.eventListedForward()</code></p>      |
| Previous   | <p>Event when prev video is displayed<br><br><strong>Actions editor:</strong><br><code>Event > Previous</code><br><strong>Code:</strong><br><code>widget.content.script.eventListedBackward()</code></p> |
| Item index | <p>Event when current video is changed<br><br><strong>Actions editor:</strong><br><code>Event > Item index</code><br><strong>Code:</strong><br><code>widget.content.script.eventItemIndex()</code></p>   |
