Youtube
The Youtube widget is a player that embeds a YouTube video inside your app screen.
Set the video URL and you can tune playback options at the same time — autoplay, looping, start and end points, captions, and more.
Definition and role
The Youtube widget takes a YouTube video URL — watch, embed, youtu.be, or playlist form — and draws an embedded player in an internal web view. It extracts the video ID from the URL to play it, and properties control playback options such as autoplay, looping, start and end points, control visibility, and captions. When the URL is empty, the widget shows a Youtube Player placeholder area instead of playing.
- Category: Contents
- Default height when added from the palette:
400 - Default playback state:
Play(autoplay with automatic mute)
Features
| Feature | Description |
|---|---|
| URL embed playback | Extracts the video ID from watch, embed, youtu.be, and playlist (list) URLs, then plays it in the embedded player. |
| Autoplay and mute | Leave the playback state at Play and the video plays automatically — it is muted automatically so autoplay can work. |
| Time range | Set the playback start and end points in seconds. |
| Looping | Plays the video on repeat. |
| Playback UI options | Set whether the player controls, related videos, minimized logo, fullscreen button, and captions appear. |
How to use
- Open the Contents category in the left widget palette.
- Drag and drop the Youtube item onto the canvas.
- In the Properties panel on the right, enter the YouTube video URL to play in
path. - Adjust playback options as needed — autoplay (
status), looping (loop), and the start and end points (startSecond,endSecond).
Properties
| Property | Description | Default | Value / type |
|---|---|---|---|
path | YouTube video URL to play (watch, embed, youtu.be, or playlist) | Empty | String |
status | Playback state. Play starts the video automatically and mutes it at the same time. | Play | Stop, Play |
startSecond | Playback start point, in seconds. 0 plays from the beginning | 0 | Number (seconds) |
endSecond | Playback end point, in seconds. 0 plays to the end | 0 | Number (seconds) |
loop | Whether to loop the video | false | True / false |
showControls | Whether the player control UI appears | true | True / false |
showRel | Whether related videos appear after the video ends | true | True / false |
modestbranding | Whether the YouTube logo is minimized | false | True / false |
fullScreen | Whether the fullscreen button appears | true | True / false |
ccLoadPolicy | Whether captions appear | false | True / false |
showLoadingBar | Whether a loading indicator appears while the page loads | false | True / false |
Notes and tips
When path is empty, the widget shows only the Youtube Player placeholder area instead of a player. Enter a valid YouTube URL to play the video.
Leaving status at Play mutes the video automatically so autoplay can work. Also, startSecond and endSecond apply only to the first playback when loop is on.
Learn more
For the full set of Widget Control items (Property, Method, and Event) that script this widget, visit Youtube Widget Control.