bangpound/sculpin-oembed-bundle

dev-master / 1.0.x-dev 2015-07-11 05:38 UTC

This package is auto-updated.

Last update: 2024-11-12 03:38:23 UTC


README

This bundle is not ready to use!

Setup

Add this bundle in your sculpin.json file:

{
    "require": {
        "bangpound/sculpin-oembed-bundle": "~1.0@dev"
    }
}

and install this bundle running sculpin update.

Now you can register the bundle in SculpinKernel class available on app/SculpinKernel.php file:

class SculpinKernel extends \Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel
{
    protected function getAdditionalSculpinBundles()
    {
        return array(
           'Bangpound\Sculpin\Bundle\OEmbedBundle\SculpinOEmbedBundle'
        );
    }
}

How to use

In a Twig template, use the oembed function with a URL argument.

{{ oembed('https://vimeo.com/86129237') }}

TODO

  • Use a different oEmbed library. excelwebzone/oemebd does not support oEmbed parameters.
  • Support caching.