please help solve the problem.

I implemented loading videofiles. I used a gem paperclip-av-transcoder.

model:
class Video < ActiveRecord::Base
  has_attached_file :video,
                    :url =>
":localhost/system/:class/:attachment/:id/:style/:filename",
                    :path =>
":rails_root/public/system/:class/:attachment/:id/:style/:filename",
                    :styles => {
                      :medium => { :geometry => "640x480", :format =>
'flv' },
                      :thumb => { :geometry => "200x100#", :format =>
'jpg', :time => 10 }
                    }, :processors => [:transcoder]
  validates_attachment_content_type :video, :content_type =>
["video/mp4", "video.mov", "video/mpeg","video/mpeg4", "image/jpg",
"image/jpeg"]
end


controller:
def create
  @video = Video.new(video_params)

  if @video.save
    flash[:success] = :video_created
    redirect_to @video
  else
    flash.now[:error] = :user_not_created
    redirect_to @video
  end
end


show.html.erb:
<video width="320" height="240" controls>
  <source src="<%= @video.video_file_name %>" type="<%=
@video.video_content_type %>">
</video>


resulting video file is loaded into the system, but not displayed.

firebug shows the wrong way:
<video width="320" height="240" controls="">
    <source src="mmm.mp4" type="video/mp4">
  </video>

actual path is:
/home/kalinin/rails/vd/public/system/videos/videos/17/medium/mmm.flv


I do not understand how to get the video on the screen.

-- 
Posted via http://www.ruby-forum.com/.

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/4d963e3bce51b8e886e7509a1f01d31c%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to