tibemolde / embedder
Embed videos (YouTube, Vimeo, Facebook) easily!
Installs: 439
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0-RC1
Requires (Dev)
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2025-03-20 15:26:25 UTC
README
Embed videos (YouTube, Vimeo, Facebook) easily!
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require tibemolde/embedder
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Embedder.
Embedder Overview
Embed videos easily!
Configuring Embedder
No configuration is needed outside of runtime-options, however you can tweak where video-posters are stored locally through the plugin-settings
Using Embedder
Basic usage:
<div class="embed embed--{{ craft.embedder.getVideoType(videoUrl) }}">
<iframe src="{{ craft.embedder.getVideoEmbedUrl(videoUrl) }}" title="{{ 'Watch video'|t }}"></iframe>
</div>
Style as you please (this is just an example):
.embed {
position: relative;
overflow: hidden;
width: 100%;
height: auto;
padding-bottom: 56.25%; /* ratio for 16:9 embed */
iframe,
object,
embed {
position: absolute;
top: 0;
left: 0;
width: 100% !important;
height: 100% !important;
border: 0;
}
}
Embedder Roadmap
Some things to do, and ideas for potential features:
- Support oEmbed
- Support audio-playlists (Spotify, Soundcloud etc)
Brought to you by TIBE Molde