video()
Creates a privacy-friendly video embed via iframe for YouTube
Parameters
Name | Type | Default |
---|---|---|
$url * | string |
– |
$poster * | Kirby\Cms\File |
– |
$options | array |
[ ] |
$attr | array |
[ ] |
Return type
string
|null
Examples
Basic example
With parameters
You can add query parameters as arrays for the respective video type using the keys youtube
or vimeo
. In case you want to use both YouTube or Vimeo URLs, you can add options for both types.
With additional attributes
You can add additional attributes as a third parameter: