Blog Video Extension
Adds responsive video embedding features to the RainLab Blog module.
Blog Video Extension
Adds responsive video embedding features to the RainLab Blog module.
This plugin extends the RainLab Blog plugin with the responsive video embedding features. The plugin was tested with Vimeo and YouTube videos, but in theory it can be used with any video service which uses iframes for embedding.
Adding video to a post
Use the following syntax to insert a video placeholder to a blog post:

The number in the first part is the placeholder index. If you use multiple videos in a post you should use unique indexes:
 
Installation via Command Line
php artisan plugin:install RainLab.BlogVideo
Styling the responsive videos
The plugin adds a wrapping DIV element around the embedded iframe element. The wrapper allows to make the video responsive, fit the containing column and maintain the aspect ratio.
<div class="video-wrapper ratio-16-9"><iframe ...></iframe></div>
Add the following CSS code to your website in order to support the video wrapper:
.video-wrapper {
position: relative;
padding-top: 25px;
margin-bottom: 15px;
height: 0;
}
.video-wrapper.ratio-5-4 {padding-bottom: 80%;}
.video-wrapper.ratio-4-3 {padding-bottom: 70%;}
.video-wrapper.ratio-16-10 {padding-bottom: 62.5%;}
.video-wrapper.ratio-16-9 {padding-bottom: 56.25%;}
.video-wrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%!important;
height: 100%!important;
}
-
Tiara Digital Advertising
Super useful plugin.
-
Paolo M
Good plugin
-
Devin Green
awesome plugin. works flawlessly
-
Michael Wanyoike
This plugin works like a charm!
-
Andi Holzer
nice module and very usefull
-
Jorge andrade
How can i use this plugin?
-
Alex Bass
Works great! I wonder if people are actually reading the instructions... You must put these lines of code in your css:
.video-wrapper { position: relative; padding-top: 25px; margin-bottom: 15px; height: 0; } .video-wrapper.ratio-5-4 {padding-bottom: 80%;} .video-wrapper.ratio-4-3 {padding-bottom: 70%;} .video-wrapper.ratio-16-10 {padding-bottom: 62.5%;} .video-wrapper.ratio-16-9 {padding-bottom: 56.25%;} .video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%!important; height: 100%!important; }And then you must call out to
<div class="video-wrapper ratio-16-9"><iframe ...></iframe></div>whatever ratio it is. Worked perfectly, thanks for this quick tool! -
generic user
For some reason, it is not working, thanks for the effort though.
-
Youngsoo-Yi
This doesn't work. Broken image shows up instead of youtube video.
Version information
octobercms 113 blog 1.0.5 blogvideo 1.0.1
-
bestxp
Crash cms after install this component
Class 'Cms\Twig\Extension' not found
-
| 1.1.2 |
Update toolbar icon. May 26, 2016 |
|---|---|
| 1.1.1 |
Minor styling update. May 26, 2016 |
| 1.1.0 |
Adds a new Video button to the Markdown editor toolbar. Aug 07, 2015 |
| 1.0.2 |
Fixes issue where videos cannot be uploaded caused by latest Markdown library. Feb 13, 2015 |
| 1.0.1 |
Initialize plugin May 13, 2014 |