Rails Play video

Hi Folks,

I want play videos, the src file should i get from assets/videos.

I just created one folder in my assets like videos and placed one .mov
file.

In my view,

Your browser does not support the video tag.

But its not working. Please advice.

I don’t think you use the assets part of the path in Rails 3.1+. Try it
with just /videos/video.mov and see what happens then.

Walter

On Thu, Jan 31, 2013 at 11:02 AM, Walter Lee D. [email protected]
wrote:

I just created one folder in my assets like videos and placed one .mov file.

In my view,

Your browser does not support the video tag.

But its not working. Please advice.

Using the HTML you have above, you’d need to house the movie under
#{Rails.root}/public somewhere, rather than #{Rails.root}/app/assets,
probably something like:

#{Rails.root}/
public/
videos/
demo.mov

Then, your source tag should use:

src="/videos/demo.mov"

I would definitly keep such large things out of the asset pipeline, as
it would bog down assets:precompile a lot.

It’s also something I’d definitely not want in my repository with my
code; I’d have some other way of versioning/deploying it.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs