flowplayer-gem/README.mdown

28 lines
988 B
Plaintext
Raw Normal View History

2011-02-01 23:35:21 +00:00
# Flowplayer Helper for Rails 3 applications
2011-02-02 00:01:20 +00:00
1. `gem 'flowplayer'` in your gem file
2. ` rails g flowplayer` or `rails g flowplayer commercial`
2011-02-02 00:01:37 +00:00
3. add `javascript_include_tag 'flowplayer.min.js'` to your application layout
2011-02-02 00:01:20 +00:00
4. read below
2011-02-01 23:35:21 +00:00
##Usage
2011-02-01 23:59:33 +00:00
<a id='video' style='display:block;width:512px;height312px;'>
2011-02-01 23:53:24 +00:00
For JQuery
= flowplayer_for :video, '/flowplayer.swf', 'jquery' do |player|
- player.playlist [{:url => "video_still.jpg" }, {:url => "video_512x288.flv", :autoPlay => false, :autoBuffering => true }]
- player.onLoad do
- 'this.unmute();'
For Prototype
= flowplayer_for :video, '/flowplayer.swf', 'prototype' do |player|
2011-02-01 23:35:21 +00:00
- player.playlist [{:url => "video_still.jpg" }, {:url => "video_512x288.flv", :autoPlay => false, :autoBuffering => true }]
- player.onLoad do
- 'this.unmute();'
## Configs are the same ones here
http://flowplayer.org/documentation/api/index.html
## TODO
More documentation