Keyword

using video as image in Category

  • Denis Bonetti
  • Denis Bonetti's Avatar Topic Author
  • Offline
  • New Member
More
11 months 3 weeks ago #172334 by Denis Bonetti
Denis Bonetti created the topic: using video as image in Category
Hello
there is a way to use a youtube video or a video uploaded on my server as image in article?
I'd like to show in the category blog some articles that have a video and not an image as a cover

thanks a lot

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
11 months 3 weeks ago #172345 by Fotis
Fotis replied the topic: using video as image in Category
Not directly. But this could make a nice feature for a future AllVideos Pro release :)

However local videos would require additional software on the server to extract some frame to use as K2 item image. YouTube videos can provide that preview frame from the YouTube API.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Маргарита Алаева
  • Маргарита Алаева's Avatar
  • Offline
  • New Member
More
1 week 4 days ago #175891 by Маргарита Алаева
Маргарита Алаева replied the topic: using video as image in Category
I was looking for a Youtube solution and came up with a small chunk of code that works for me.
I had to disable video display in k2 category settings to make it work.

<?php
$video = $item->video;
$video = preg_replace('/\{[^}]+\}/', '', $video);
$v_thumb = ' i.ytimg.com/vi/ ' . $video . '/maxresdefault.jpg';
echo $v_thumb;
?>
<img src="<?php echo $v_thumb; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>" />

This will display the video thumbnail from youtube server.

Would've been great if you could add auto thumb generation for k2 article in the future versions.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 week 3 days ago #175907 by Fotis
Fotis replied the topic: using video as image in Category
This is part of AllVideos Pro actually :) Should be out within the coming months...

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum