Sha256: 2b91345555468ccb789f1066641e0ccf602b6f981ed4a29f3730c37855b1b76c

Contents?: true

Size: 804 Bytes

Versions: 5

Compression:

Stored size: 804 Bytes

Contents

class Video < Document
  after_save :videoprocess
  
  has_attached_file :file, 
                    :url => '/:class/:id.:extension',
                    :path => ':rails_root/documents/:class/:id_partition/:style.:extension',
                    :styles => {:webm => {:format => 'webm'},
                                :flv => { :format => 'flv' },
                                :thumb   => {:geometry => "48x48" , :format => 'png', :time => 5},
                                :thumb0  => {:geometry => "130x80", :format => 'png', :time => 5}
                    },:processors => [:ffmpeg]
                    
  def videoprocess
    Resque.enqueue(Videoencoder, self.id)
  end
     
                      
  # Thumbnail file
  def thumb(size, helper)
      "#{ size.to_s }/video.png"
  end
  
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
social_stream-0.9.2 documents/app/models/video.rb
social_stream-documents-0.2.6 app/models/video.rb
social_stream-documents-0.2.5 app/models/video.rb
social_stream-documents-0.2.4 app/models/video.rb
social_stream-documents-0.2.3 app/models/video.rb