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