Customize video embeds


I would like to add custom options to my vimeo embed src URL, to get something like the following:

<iframe src=";title=0&amp;byline=0&amp;portrait=0"</iframe>

I have this in my template file (using the Kirby 3 Embed plugin):

  <?php if($embed = $page->embed()->toEmbed()): ?>
    <div class="video-wrapper">
      <?= video($embed->url()) ?>
  <?php endif ?>

I am not sure of the syntax to add vimeo options that will be used as query params in the embed URL. (I’m looking to set byline and title to 0, and color to ‘ffffff’).

I have seen similar questions (like this one for Kirby 2) but I am not sure how to implement this in my case.


You can pass the options like this:

<?= video('',[

    'vimeo' => [
        'portrait'=> 1,
        'color' => '000000',
        'title' => 0,
        'byline' => 0,

]) ?>

This allows you to also set options for YouTube videos, by using the youtube key.

So simple — works perfectly, thank you!