https://github.com/statikbe/craft-video-parser
https://github.com/statikbe/craft-video-parser
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/statikbe/craft-video-parser
- Owner: statikbe
- License: mit
- Created: 2021-04-08T09:57:17.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-01T09:16:16.000Z (almost 2 years ago)
- Last Synced: 2025-04-11T17:14:15.512Z (about 1 year ago)
- Language: PHP
- Size: 165 KB
- Stars: 3
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.MD
- License: LICENSE
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.
````
````