gesdinet / videothumbnailextensionbundle
Video Thumbnail Extension Bundle
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
This package is auto-updated.
Last update: 2024-11-05 03:51:08 UTC
README
Install
composer require "gesdinet/videothumbnailextensionbundle": "~0.1.0"
Symfony 2.x
app/AppKernel.php:
$bundles = array( // ... new Gesdinet\Bundle\VideoThumbnailExtensionBundle\VideoThumbnailExtensionBundle(), // ... );
Silex
use Gesdinet\Bundle\VideoThumbnailExtensionBundle\Twig\VideoThumbnailExtension; $app['twig'] = $app->share($app->extend('twig', function($twig, $app) { $twig->addExtension(new VideoThumbnailExtension()); return $twig; }));
Usage
For youtube:
{{ video.code|video_thumbnail }}
For other service like Vimeo (WIP):
{{ video.code|video_thumbnail('vimeo') }}