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, <video width="320" height="240" controls="controls"> <source src="/assets/videos/demo.mov" type="video/mov" /> Your browser does not support the video tag. </video> But its not working. Please advice. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/TygyXNbguhoJ. For more options, visit https://groups.google.com/groups/opt_out.
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 Jan 31, 2013, at 7:31 AM, Maddy wrote:> 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, > > <video width="320" height="240" controls="controls"> > <source src="/assets/videos/demo.mov" type="video/mov" /> > Your browser does not support the video tag. > </video> > > But its not working. Please advice. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/TygyXNbguhoJ. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Thu, Jan 31, 2013 at 11:02 AM, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> 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 Jan 31, 2013, at 7:31 AM, Maddy wrote: > >> 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, >> >> <video width="320" height="240" controls="controls"> >> <source src="/assets/videos/demo.mov" type="video/mov" /> >> Your browser does not support the video tag. >> </video> >> >> 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. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.