Youtube embed options

Is there a way to pass parameteres like show here in the in Kirby youtube method?

Yep, same as here: Kirby built-in Vimeo embed automatically cleaning up embed link

1 Like

I found a really good free youtube player called :wink:

If someone wants more options. :sunny:

There’s also a Kirbytag for that player:

Don’t know what options it offers, but maybe useful.

1 Like

Great! :smile:

After testing a lot yesterday. I found that the plyr player when used with YouTube embed option have a double play button and some other issues due to the way YouTube embed works. So I ended up rolling back and trying to strip the YouTube player for as much stuff possible but still have functional. Looks better than the normal embed.

Is there a way to make a kirbytext tag to overwrite the default one to maintain the clean player @texnixe?

Also for anyone that know more about this here is my code:

<figure class="video">
    <?php echo embed::youtube($page->videolink(), ['options' => ['modestbranding' => 1, 'showinfo' => 0, 'rel' => 0, 'iv_load_policy' => 3, 'playsinline' => 1, 'enablejsapi' => 1, 'origin' => $site->url(), 'controls' => 1]]);?>

More options here:

That will give a player like this:

Yes, you can overwrite an existing kirbytag by copying it into the /site/tags folder, under the same name; then make your modifications. Alternatively, you can create a new tag.

1 Like