Oembed plugin : I only have play button

I try to integrate videos on my website I installed the Oembed plugin that looks very usefull.
But after a first test I only have the play button in full size :

And there is the generated code :

and this the code I use :
<?php echo $section->url()->oembed(); ?>

Do you have an idea where did it come?

Thanks in advance,

at http://getkirby-plugins.com/oembed:

Inside templates:

Use the field method ->oembed() on fields that contain an url reffering to a supported medium (e.g. YouTube, Vimeo, Soundcloud).

<?php echo $page->featured_video()->oembed(); ?>

Here is assumed, that $page->featured_video() is the field with the video.
It is without ->url()! Don’t name a field url, this breaks Kirby.

Good luck!

Hello and thanks for your answer,
Is assumed to use ->oembed() on an url field. For the example, the author use featured_video() but mine is url(), I don’t think the problem came form here, isn’t it?

Rename the field e.g. to “videourl”!

The labelof this field may be URL or what you want!

The url() method is reserved by Kirby, so that might be an issue. Try to use another field name.

hm, do you think ?
I change to “urlvideo” : <?php echo $section->urlvideo()->oembed(); ?>
and my blueprints file looks like that (I use builder plugin) :

        label: Video
            label: Paste your video url here
            type: url
            icon: video-camera

And the problem is still here :confused:

video is another reserved word, by the way. You need to be careful with these … Could you test if the problem persists outside of a builder field? In my test in a starter kit with a normal url field, the plugin works alright …

at http://getkirby-plugins.com/oembed:

Requires: PHP 5.5+

It seems to grab a video thumb though. Could you check if the URL that is used as a background-image in the thumb div points to the correct thumb image?

I have PHP 5.6, the video thumb url is the right one and even with another name videoplayer it’s still doesn’t works. :confused:

Looks like you are using an invalid video url, the one I can see in your screenshot leads to a page rather than a video, so it does not work? if I use the same URL, I get the same result as you do. Pls. test with another video url


Annnnnnnnnd that why. The plugin don’t like the urls like https://vimeo.com/channels/staffpicks/149184273 but with https://vimeo.com/149184273 it’s works! o/
Thanks all, problem solved !

1 Like

Happy to hear that it works for you :slightly_smiling: