Skip to main content

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

FeatureDescription
URL embed playbackExtracts the video ID from watch, embed, youtu.be, and playlist (list) URLs, then plays it in the embedded player.
Autoplay and muteLeave the playback state at Play and the video plays automatically — it is muted automatically so autoplay can work.
Time rangeSet the playback start and end points in seconds.
LoopingPlays the video on repeat.
Playback UI optionsSet whether the player controls, related videos, minimized logo, fullscreen button, and captions appear.

How to use

  1. Open the Contents category in the left widget palette.
  2. Drag and drop the Youtube item onto the canvas.
  3. In the Properties panel on the right, enter the YouTube video URL to play in path.
  4. Adjust playback options as needed — autoplay (status), looping (loop), and the start and end points (startSecond, endSecond).

Properties

PropertyDescriptionDefaultValue / type
pathYouTube video URL to play (watch, embed, youtu.be, or playlist)EmptyString
statusPlayback state. Play starts the video automatically and mutes it at the same time.PlayStop, Play
startSecondPlayback start point, in seconds. 0 plays from the beginning0Number (seconds)
endSecondPlayback end point, in seconds. 0 plays to the end0Number (seconds)
loopWhether to loop the videofalseTrue / false
showControlsWhether the player control UI appearstrueTrue / false
showRelWhether related videos appear after the video endstrueTrue / false
modestbrandingWhether the YouTube logo is minimizedfalseTrue / false
fullScreenWhether the fullscreen button appearstrueTrue / false
ccLoadPolicyWhether captions appearfalseTrue / false
showLoadingBarWhether a loading indicator appears while the page loadsfalseTrue / false

Notes and tips

note

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.

tip

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

tip

For the full set of Widget Control items (Property, Method, and Event) that script this widget, visit Youtube Widget Control.