Video
A populated Video Picker field returns a Video object. You can also obtain one with craft.videoPicker.getVideoByUrl() or a source's getVideoById() method.
Properties
Type: string|null
The ID of the video.
Type: string|null
The URL of the video.
Type: string|null
A handle identifying the video source, e.g. youtube or dailymotion.
Type: DateTime|null
The date the video was published or created (DateTime object).
Type: int|null
Duration of the video in seconds.
Type: string
Duration of the video in ISO8601 format.
Type: int|null
The number of times the video has been played.
Type: string|null
The name of the video's author.
Type: string|null
URL to the author’s profile or channel.
Type: string|null
Username of the author.
Type: array
An array of thumbnail records. Each record contains a url and may include integer width and height values.
Type: string|null
The title of the video.
Type: string|null
The description of the video.
Type: bool
Whether the video is private.
Type: int|null
Width of the video in pixels.
Type: int|null
Height of the video in pixels.
Type: array
Array of raw data for any additional information provided by the API.
Methods
Returns: verbb\videopicker\base\SourceInterface|null
Returns the Source for the video.
Returns: string
Returns a human-readable format of the duration (e.g., 01:23:15).
Returns: string
Returns the duration of the video in ISO8601 format.
Returns: string|null
Retrieves the URL for the closest available thumbnail to the specified width.
Returns: string|null
Returns the HTML embed code for the video, with optional customisation parameters.
Returns: string|null
Retrieves the direct URL to embed the video with optional customisation parameters.