Skip to content

Kirby 3.6.6

(video: …)

Embeds a video from YouTube, Vimeo or a local file by URL or filename

Attributes

autoplay
caption
controls
class
height
loop
muted
poster
preload
style
width

Supported video sources

YouTube

Embedded YouTube video by video URL:

(video: http://www.youtube.com/watch?v=lLuc6rtWkrM)

The following link YouTube link formats are recognized:

Basic video URLs:

URLs with additional query parameters:

Playlists:

Vimeo

Embedded Vimeo video by video URL:

(video: http://vimeo.com/3432886)

Local and remote videos

You can now embed videos from the local or from remote servers.

# local
(video: local-video.mp4)

# remote
(video: https://example.com/sample-video.mp4)

The video will be muted automatically if autoplay is enabled and muted is not defined. To start autoplay with sound, use it as in the following example:

(video: local-video.mp4 autoplay: true muted: false)

Options

Caption

(video: http://youtu.be/lLuc6rtWkrM caption: This is a really nice video)

<iframe> size

(video: http://vimeo.com/3432886 width: 300 height: 200)

Custom CSS class

(video: http://youtu.be/lLuc6rtWkrM class: myvideo)

New attributes

The video tag now supports some attributes of the HTML <video> element: autoplay, controls, loop, muted, poster, preload

(video: local-video.mp4 autoplay: true)
(video: local-video.mp4 controls: false autoplay: true loop: true)
(video: local-video.mp4 poster: cover.jpg)
(video: local-video.mp4 preload: auto)
(video: https://example.com/sample-video.mp4 muted: true controls: false autoplay: true)
(video: local-video.mp4 poster: https://example.com/sample-cover.jpg)

These new attributes are not supported by video providers such as YouTube and Vimeo.

Version 2's youtube and vimeo tags

To keep your content compatible with older Kirby versions, we still have the old youtube and vimeo KirbyTags. We recommend switching to the new video tag though.