This gem provides flowplayer flash player for your Rails application.
Add this line to your application's Gemfile:
gem 'flowplayer-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install flowplayer-rails
<a id='video' href="video_url.mp4" style='display:block; width:480px; height:400px;'>
For JQuery
<%= flowplayer_for :video, asset_path('flowplayer-3.2.18.swf'), 'jquery' do |player| %>
<% player.clip autoPlay: true, autoBuffering: true, scaling: "fit" %>
<% player.play replayLabel: nil, opacity: 0 %>
<% player.canvas backgroundColor: "transparent", backgroundGradient: "none" %>
<% player.plugins controls: { backgroundColor: "rgba(239, 239, 239, 0.1)", backgroundGradient: "none", all: false, scrubber: true, play: true, mute: true, fullscreen: true, autoHide: "always", height: "20px"} %>
<% player.onLoad do %>
<% 'this.unmute();' %>
<% end %>
<% end %>
For Prototype
<%= flowplayer_for :video, asset_path('flowplayer-3.2.18.swf'), 'prototype' do |player| %>
<% player.clip autoPlay: true, autoBuffering: true, scaling: "fit" %>
<% player.play replayLabel: nil, opacity: 0 %>
<% player.canvas backgroundColor: "transparent", backgroundGradient: "none" %>
<% player.plugins controls: { backgroundColor: "rgba(239, 239, 239, 0.1)", backgroundGradient: "none", all: false, scrubber: true, play: true, mute: true, fullscreen: true, autoHide: "always", height: "20px"} %>
<% player.onLoad do %>
<% 'this.unmute();' %>
<% end %>
<% end %>
http://flowplayer.org/documentation/api/index.html
- Fork it ( http://github.com//flowplayer-rails/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request