I’m new to kirby and web development in general. I’m making a single page portfolio site with projects that consist of images and occasionally an embedded vimeo video. I’ve managed to install the oembed plugin but I’m have a few problems.
For projects that don’t have a vimeo video the phrase ‘No medium found for URL’ is displayed. How can I get rid of this?
I can’t get the vimeos to autoplay despite setting these in both per embed options and global options
It would also be preferable if the oembed thumb was not displayed. How can I set this?
Apologies for my inexperience.
Maybe oembed is not appropriate for what i’m trying to achieve. Is there another plugin or solution that would allow vimeo content to be added through the panel but use the autoplay features and embed options inherent in Vimeo?
Which but of the code specifically? I use just a normal vimeo link and it works. The problem is that for projects that aren’t supposed to have vimeo links, I don’t want anything to appear on the screen, instead the message ‘No medium found for URL’ displays.
That why I wanted your template code, you could wrap it in an if statement that checks if the field is empty or not and then either executes the code or not.
<?php
if($page->field()->isNotEmpty()): ?>
// do something
<?php endif ?>
Perfect! Thank you for your help. I changed the thumbnails opacity to 0, this will do for now.
I’ve tested the in different browsers and autoplay still doesn’t work. Do you think there is way to use the autoplay embed properties inherent in Vimeo?
I could not get the autoplay feature to run either and I don’t know how it is implemented in Vimeo. Have you tried the vimeo kirbytag yet as an alternative?
Edit: No, the kirbytag does not have an autoplay option, I’m afraid.
<?php foreach($project->vimeolinks()->yaml() as $vimeovid): ?>
<?php echo $vimeovid['vimeoid'] ?>
<?php endforeach ?>
```
This will then just embed the iframe though. You can't use that together with the vimeo helper, I guess.