An open API service indexing awesome lists of open source software.

https://github.com/statikbe/craft-video-parser


https://github.com/statikbe/craft-video-parser

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# Video parser

This is a little plugin to get the ID from a youtube of vimeo URL, so that it can be used to create a video embed.

## Usage

The plugin comes with a twig function that you use like this:
````
{% set video = craft.videoparser.parse(entry.video) %}
````
It returns an object with the following properties:
- Type (youtube or vimeo)
- ID
- embedSrc (specific to the type)
- extraParts (url parameters separated by an &)

Then you can create your own embed as you see fit.

````

````