You are viewing an older version of the Video Picker documentation (1.x).
View the latest version (2.x) →
Template Guides
Available Variables
The following methods are available to call in your Twig templates:
craft.videoPicker.getAllSources()
Returns a collection of Source objects.
craft.videoPicker.getAllEnabledSources()
Returns a collection of enabled Source objects.
craft.videoPicker.getAllConfiguredSources()
Returns a collection of configured Source objects.
craft.videoPicker.getSourceById(id)
Returns a Source object by its ID.
craft.videoPicker.getSourceByHandle(handle)
Returns a Source object by its handle.
craft.videoPicker.getVideoByUrl(videoUrl, clearCache = false)
Returns a Video object for the provided URL. You can also opt to fetch live data with clearCache = true, but this will impact performance.
craft.videoPicker.getEmbedUrl(url, params)
Returns the embed URL for any embeddable media. params can be used to add additional query string parameters to the URL.
craft.videoPicker.getEmbedHtml(url, params)
Returns the embed iframe HTML for any embeddable media. params can be used to add additional attributes to the <iframe> element.
craft.videoPicker.getEmbedData(url)
Returns the full embed data for any embeddable media.
Last updated: May 4, 2026, 8:57:56 AM