i’m stuck with a Rails application that uses flowplayer that plays flv files.
I’m using the flowplayer gem here. I follow the instructions and the usage part where you have to choose between jQuery or Prototype comes with a bit of code. I don’t know how to put this code, since i don’t know its language. Is it Ruby code? jQuery code?
Anyway, has anyone tried and succeed playing flash videos with this? I’d appreciate if someone could tell me what to do with that piece of code that’s bugging me.
Thanks in advance.
UPDATE:
I update the question with the code in the view to narrow the problem.
<a href="<%= url_for(:controller => "attachments", :action => "public_download", :id => @attachment)%>"
id='video' style='display:block;width:512px;height:312px;'>
<%= flowplayer_for :video, 'flowplayer.swf' do |player|%>
<%- player.playlist [{:url => "video_still.jpg" }, {:url => "#{Rails.root}/public#{@attachment.arxiu.url}", :autoPlay => false, :autoBuffering => true }] %>
<%- player.onLoad do %>
<%- 'this.unmute();' %>
<% end %>
<% end %>
</a>
The first line is the url of the action. Meaning that if i click in the video I download it.
This action works, what it doesn’t show is the player with the video. So i can narrow it to the code that comes from github.
I’ve opted for deleting the gem and doing it via script. Now it works perfectly. It seems the gem didn’t find the plugin or the file, if you kwow a little javascript I recommend you to do it via script, you’ll save a lot of pain.