This neat project brings the cool MediaElement.js 2.16.4 (HTML5/Flash/Silverlight video player) to the Rails asset pipeline. NOTE: This gem requires jquery to be included, which shouldn't be an issue.
Add the gem to the list of required gems in your Gemfile
:
# ...
gem "mediaelement_rails"
# ...
Load the Mediaelement Javascript in your application.js
:
//= require mediaelement_rails
Load the Mediaelement CSS in your application.css
:
/*
*= require mediaelement_rails
* and optionally:
*= require mediaelement_rails/mejs-skins
*/
This is easy as hell too!
Don't include any CSS and include the following in your application.js
to get it working:
//= require mediaelement_rails/rails
Nothing special! This project includes all assets you might need.
- Add support for
flashmediaelement-cdn.swf
for cases when the assets are hosted on a different domain than the rails application. - Setup appraisal gem to test against rails 3.x and 4.x
- Mark Oleson - current
- Tobias Schlottke
- Pete Browne
This project rocks and uses MIT-LICENSE.