Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add seeking support for creating thumbnails of video #12

Merged
merged 2 commits into from Apr 4, 2015

Conversation

attenzione
Copy link
Contributor

support time in style params, including lambda

model Fake

  has_attached_file :attachment, url:  '/uploads/:class/:id/:style.:extension',
                                 path: ':rails_root/public:url',
                                 styles: {
                                    thumb: { format: 'jpg', time: -> (attachment) { attachment.instance.method(:style_time_for) }, processors: [ :transcoder ] }
                                 }

  def style_time_for(meta, options)
    meta[:duration] / 2
  end

end

should fix issue #2

@attenzione
Copy link
Contributor Author

Travis CI build failed because it's required updated av gem, which i already submitted. Need to bump version to 0.8.2 and resubmit this request with fixed dependencies

@owahab
Copy link
Member

owahab commented Mar 22, 2015

AV 0.9.0 was released. Please update the pull request.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.48%) to 92.68% when pulling a2463ae on attenzione:master into b8f777e on ruby-av:master.

owahab added a commit that referenced this pull request Apr 4, 2015
add seeking support for creating thumbnails of video
@owahab owahab merged commit d557545 into ruby-av:master Apr 4, 2015
@tux-mind
Copy link

please explain this feature into the README too 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants