Video#

Whenever you're dealing with a video in your template, you're actually working with a Video object.

Attributes#

AttributeDescription
idThe ID of the video.
urlThe URL of the video.
sourceHandleA handle identifying the video source, e.g., "YouTube" or "Vimeo".
dateThe date the video was published or created (DateTime object).
durationDuration of the video in seconds.
playsThe number of times the video has been played.
authorNameThe name of the video's author.
authorUrlURL to the author’s profile or channel.
authorUsernameUsername of the author.
thumbnailsArray of thumbnail URLs for the video.
titleThe title of the video.
descriptionThe description of the video.
privateWhether the video is private.
widthWidth of the video in pixels.
heightHeight of the video in pixels.
rawArray of raw data for any additional information provided by the API.

Methods#

MethodDescription
getSource()Returns the Source for the video.
getFormattedDuration()Returns a human-readable format of the duration (e.g., 01:23:15).
getThumbnail($width = 600)Retrieves the URL for the closest available thumbnail to the specified width.
getEmbedHtml($options = [])Returns the HTML embed code for the video, with optional customization parameters.
getEmbedUrl($options = [])Retrieves the direct URL to embed the video with optional customization parameters.

Previous ← Source Provider Next Events →