YouTube / Twitch
Embed youtube videos.
YouTube / Twitchâ
Embed YouTube videos/streams, or Twitch streams.

Editorâ

Screen ratioâ
The screen ratio of the video: 16:9 or 4:3
URLâ
The YouTube/Twitch URL of the video to play.
Thumbnail urlâ
(Optional) Let's the user set a customized thumbnail for the video.
Scripting Propertiesâ
Scripting Properties {.tabset}â
urlâ
String; Links must be https:// and must either be a youtube, twitch, soundcloud, spotify.
get()â
feature.get('url')
// returns: "https://..."
set()â
feature.set({'url':"https://www.youtube.com/?v=..."})
defaultâ
""
previewUrlâ
String; Links must be https:// and must either be a .png,.gif,jpg.
get()â
feature.get('previewUrl')
// returns: "https://..."
set()â
feature.set({'previewUrl':"https://..."})
defaultâ
""
screenRatioâ
String; Links must be https:// and must either be a .png,.gif,jpg.
get()â
feature.get('screenRatio')
// returns: "43"
set()â
feature.set({'screenRatio':"169"})
defaultâ
"169"
typeâ
String;
get()â
feature.get('type')
/* or */
feature.type
// returns: 'youtube'
Scripting methodsâ
Scripting methods {.tabset}â
play()â
feature.play()
plays the video
feature.pause()â
feature.pause()
pauses the video