class DragonflyVideo::Plugin

Public Instance Methods

call(app, _opts = {}) click to toggle source
# File lib/dragonfly_video/plugin.rb, line 5
def call(app, _opts = {})
  app.add_analyser :video_properties, DragonflyVideo::Analysers::VideoProperties.new

  [
    DragonflyVideo::Analysers::VideoProperties::VIDEO_PROPS
  ].flatten.each do |analyser|
    app.add_analyser analyser do |content|
      content.analyse(:video_properties)[analyser]
    end
  end

  app.add_processor :screenshot, DragonflyVideo::Processors::Screenshot.new
end