> For the complete documentation index, see [llms.txt](https://docs.flipabit.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flipabit.dev/api/widget/youtube.md).

# YouTube

<div align="left"><img src="/files/-MIxukSIG4VjZ3WIQW8F" alt=""></div>

| Property    | Function                                                                                                                                                                                    | Type     |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| Url         | <p>Sets YouTube url address<br><br><strong>Actions editor:</strong><br><code>Property > YouTube > Url</code><br><strong>Code:</strong><br><code>widget.content.webVideoUrl</code></p>       | `string` |
| Loop        | <p>Looping the playback<br><br><strong>Actions editor:</strong><br><code>Property > YouTube > Loop</code><br><strong>Code:</strong><br><code>widget.content.loop</code></p>                 | `bool`   |
| Autoplay    | <p>Start playback automatically<br><br><strong>Actions editor:</strong><br><code>Property > YouTube > Autoplay</code><br><strong>Code:</strong><br><code>widget.content.autoplay</code></p> | `bool`   |
| Hd          | <p>Play in hd quality<br><br><strong>Actions editor:</strong><br><code>Property > YouTube > Hd</code><br><strong>Code:</strong><br><code>widget.content.hd</code></p>                       | `bool`   |
| Player vars | <p>Sets player vars<br><br><strong>Actions editor:</strong><br><code>Property > YouTube > Player vars</code><br><strong>Code:</strong><br><code>widget.content.playerVars</code></p>        | `string` |

## 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>Play next video in playlist<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Next</code><br><strong>Code:</strong><br><code>widget.content.script.actionNext()</code></p>           |
| Prev       | <p>Play next prev in playlist<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Prev</code><br><strong>Code:</strong><br><code>widget.content.script.actionPrev()</code></p>            |
| Play Video | <p>Play video by number<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Play Video</code><br><strong>Code:</strong><br><code>widget.content.script.actionPlayAt(int index)</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>                          |
| Video Changed | <p>Event when current video is changed<br><br><strong>Actions editor:</strong><br><code>Event > Video Changed</code><br><strong>Code:</strong><br><code>widget.content.script.eventVideoChanged()</code></p> |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.flipabit.dev/api/widget/youtube.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
