I am quite new to Kirby and in the process of adding a video to my page. I want to enable my content editors to add a video without touching the template files.
The way Kirby integrates images into blueprints is very convenient and I was quite disappointed that there is no ‘video’ or ‘file’ equivalent.
Have I missed something? Or can you point me into a direction to achieve a similar functionality for video as Kirby offers it for images?
fields:
video:
label: Video
type: select
options: videos
Not as visual and without drag and drop support, but it works out of the box. Alternatively you could copy the image field to your site/fields directory, rename it video and modify it to load videos instead of image files.
You should always use an if statement to check if the video exists before trying to output an URL (in fact, not only where videos are concerned, but in general check if an object exists before you try to do anything with it)
You can use fanningert/kirbycms-extension-video, if you want to show your own (local) videos.
I use “ffmpeg” to convert video to the needed file-versions.