Integrate other video streaming

Dear all,
Is it possible to implement other streaming videos than YouTube or Vimeo?
For example this one here

Any hints appreciated :slight_smile:

Regards Matthias 22

Hi Matthias, welcome to the forum.

Yes, that is possible. What exactly do you need help with? Creating a block type that supports Or an alternative to the video() helper to output it in a template?

Hi Texnixe,
thanks for the swift reponse.
Asctually we are using kirby with YouTube-videos which is actually not compliant. We would like to test a different streaming method using server from european supplier. But it must be performant enough.

Actual in the panel intro we have a (video: YouTube) command. As I´m personally not a developer it would it perfect to have a different command to video. Is there any kind of method to stream from other sources?


Oh, ok, this is about kirbytags then.

You have two options here:

  1. Create a custom kirbytag for your new video streaming service

  2. Overwrite the existing video kirbytag.

Check out the source code for the existing video Kirbytag to get an idea how to create your own.

The original tag is rather complicated, because it works with both YouTube and Vimeo videos with all sorts of options.

Your custom Kirbytag can be much simpler, it only has to return an iframe with the url you pass as argument to the tag.

1 Like

Thanks texnixe - will talk to our developer. Greetings vom Buchholz to Mainz.

A simple example could look like this:



Plugin’s index.php

use Kirby\Cms\App as Kirby;
use Kirby\Toolkit\Html;

Kirby::plugin('texnixe/fairtube', [
    'tags' => [
        'fairtube' => [
            'attrs' => [
            'html' => function($tag) {
                $src = $tag->value;
                $attrs = [
                    'height'      => $tag->height,
                    'width'       => $tag->width,
                    'frameborder' => 0,
                    // other attributes
                $video = Html::iframe($src, Html::videoAttr($attrs));
                return Html::figure([$video ?? ''], $tag->caption, [
                    'class' => $tag->class ?? 'video',
                    'style' => $tag->style