Hey,

According to my knowledge you can play the video url using a iframe or
using Y_tube gem...
On Wed, Dec 28, 2011 at 9:01 PM, Ralph Shnelvar wrote:

hr> hey everyone i want to add a video and play it using ruby on rails .
hr> how can i do it. can anyone help me plzz..

hr> Thanks in advance

After struggling with this for several days, I have finally been able to
get some videos to play in Rails 3.1.2. There may be other ways of playing
videos and if there are I'd sure like to hear about
it.

Here is some preliminary documentation. I'm gonna write up more when I
get all the kinks out.


The following instructions are for Rails 3.1.2

1) Download from here:
http://rubydoc.info/gems/jw_player_helper/0.0.1/file/README.markdown#


2) Add
gem 'jw_player_helper'
to your Gemfile


3) Do
bundle install
or
bundle install --deployment
depending on your needs.


4) Assuming that you are using sprockets (which seems to be the
recommended default), make sure that swfobject.js is accessible from your
assets.

You can check if swfobject.js is accessible by displaying
Rails.application.config.assets.paths.

Rails.application.config.assets.paths is an array of fully qualified
directory names where assets can be found. Make sure that swfobject.js is
in one of the directories and not in a subdirectory
of one of these directories.


5) Place your video(s) in a directory underneath public. I chose a
directory named "videos".

= video_player( {:file => 'videos/my_video.flv'}, {:width => '100%'} )



Let me know if you get videos to work and if this sketch of documentation
needs to be beefed up.

Oh, this sketch is due to a frustrating 5 days of trying to get videos to
play on 3.1.2. I hope it takes you a lot less time.



--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 10 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 28, '11 at 10:56a
activeMar 6, '13 at 9:16a
posts10
users7
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase