YouTube: Difference between revisions
Jump to navigation
Jump to search
Created page with "file:youtube.png == Description == The YouTube control lets you embed YouTube videos in your app. All the settings needed to display a video can be set at design time in..." |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
If you do want to change any settings at runtime, you can do so. Use the .refresh() method to redisplay the video with your new settings. | If you do want to change any settings at runtime, you can do so. Use the .refresh() method to redisplay the video with your new settings. | ||
Rather than '''Start in Desktop Browser''' (in the '''Run''' menu), use '''Deploy to Local Folder'''. That starts it in a server (as you would if you were running as a “real” app). | |||
For more information, please see [https://developers.google.com/youtube/player_parameters Google's docs]. | |||
== Properties == | == Properties == | ||
Line 23: | Line 27: | ||
| modestbranding || Show YouTube logo? | | modestbranding || Show YouTube logo? | ||
|- | |- | ||
| playsinline | | playsinline || Fullscreen playback on iOS? | ||
|- | |- | ||
| rel || Show related videos when done? | | rel || Show related videos when done? | ||
Line 34: | Line 38: | ||
|- | |- | ||
| theme || Display theme: dark or light | | theme || Display theme: dark or light | ||
|- | |||
| width || Height is calculated from this value. | |||
|} | |} | ||
== Events == | == Events == |
Latest revision as of 19:21, 8 October 2024
Description
The YouTube control lets you embed YouTube videos in your app. All the settings needed to display a video can be set at design time in AppStudio: no additional code needs to be written.
If you do want to change any settings at runtime, you can do so. Use the .refresh() method to redisplay the video with your new settings.
Rather than Start in Desktop Browser (in the Run menu), use Deploy to Local Folder. That starts it in a server (as you would if you were running as a “real” app).
For more information, please see Google's docs.
Properties
videoID | YouTube Video ID |
playlist | Comma separated list of video IDs to play. |
autoplay | Start playing right away? |
autohide | Autohide controls? |
controls | Show player controls? |
modestbranding | Show YouTube logo? |
playsinline | Fullscreen playback on iOS? |
rel | Show related videos when done? |
ratio | Aspect ratio: 16x9 or 4x3 |
showinfo | Show info about the video? |
start | Second to start at |
theme | Display theme: dark or light |
width | Height is calculated from this value. |
Events
Events are handled by the control itself.
Example
This code lets the user enter a Video ID at runtime. It also resizes based on screen size.
Sub Main() txtVideoID.text=YouTube1.settings.videoID End Sub Function btnRefresh_onclick() YouTube1.settings.videoID = txtVideoID.text YouTube1.settings.width = Form1.Width-20 YouTube1.refresh() End Function