Skip to content

bagwanpankaj/flash_player_helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flash Player Helper(Rails 3.x and Rails 2.x Compatible)

What Is It?

Flash layer Helper is a Rails plugin that presents an ActionView wrapper for rendering JW Flash Player 5.1 and Image Rotator

JW Flash Player is a popular open source Media player that supports most media formats.

This helper is also backward compatible.

Getting Started

Rails 2.x

script/plugin install git://github.com/bagwanpankaj/flash_player_helper.git

Rails 3.x

rails plugin install git://github.com/bagwanpankaj/flash_player_helper.git

This will automatically setup JW Flash Player for your rails application.

If required files are not copied autometically under public directory then you can copy them by running

rake flash_player:install

How to use

Include swfobject javascript into layout or view file

<%= javascript_include_tag 'swfobject' %>

then In your views use it like
For Flash Player
<%= player() %>

and for Image Rotator
<%= image_rotator() %>

The above command will render flash player or Image rotator with default configuration.
The helper method for flah player looks like:
player(player_options = {},config = {})

and for Image Rotator
image_rotator(player_options = {},config = {})

In which player_options contains options that you can pass for JW Flash Player, including flashvars supported by adobe flash.
Note: all the flashvars should be passed under :flahvars key in player_options as a hash like

<%= player(:allowfullscreen => 'true',:allowscriptaccess => 'true',{:flashvars => {:skin => '/swf/skins/bekle.swf', :height => '600'}})%>

You can find list of supported flashvars for Flash Player here
and flashvars for Image Rotator can be found here

It supports skin in both format either you can pass zip file or a swf file to skin flashvars.

Note: Given relative path should be relative to public folder of your application.

Credits

Credit for this plugin goes to JW Flash Player Team for making such a awsome flash player.

More Info

For more info write me at bagwanpankaj[at]gmail.com

Copyright © 2010 Bagwan Pankaj: http://bagwanpankaj.com, released under the MIT license

About

Helper wrapper for JW Flash Player and Image Rotator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages