Skip to content


Subversion checkout URL

You can clone with
Download ZIP
RefineryCMS engine
Ruby JavaScript
Branch: master
Pull request Compare This branch is 34 commits behind adexin-team:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Refinery CMS Video.js

Simple video engine for Refinery CMS. It adds 'Videos' tab to admin menu where you can manage videos. And adds 'add video' link to WYMeditor on 'Pages'.

There are three ways to include video in your project.

  • You can embedded video (like youtube or vimeo iframes)
  • You can upload files
  • You can use link to external source

Video (instance of ::Refinery::Videos::Video model) aggregates different sources (files and links, one or many).

Instance method Video#to_html return html video tag like:

<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="264"
poster="my_video_poster.png" data-setup="{}"> <source src="oceans-clip.mp4" type='video/mp4'> <source src=""" type='video/webm'> </video>

This content can be added to page in WYMeditor or everywhere in your view like:

<div class='video'> <%= @my_video.to_html %> </div>

Engine use Video.js player to playback video (except embedded video, of course). Engine allows you to manage playback configuration (poster image, width, height, autoplay, controls, etc). When you insert video to pages using wymeditor, you insert HTML code with video (or iframe) tag. Engine will automatically download video.js library on frontend.


You can see engine in action here Use / to login. Please, remove you videos after playing around.


Refinery CMS version 2.0.1 or above


Open up your Gemfile and add at the bottom this line:

gem 'refinerycms-videojs'

Now, run bundle install

Next, to install the video extension run:

rails generate refinery:videos

Run database migrations:

rake db:migrate

And you're done.

Developing and Contribution

More Information

Something went wrong with that request. Please try again.