module VideoScreenshoter
Constants
- VERSION
Attributes
ffmpeg[RW]
imagemagick[RW]
output_dir[RW]
output_file[RW]
verbose[RW]
Public Class Methods
new(params)
click to toggle source
# File lib/video_screenshoter.rb, line 19 def self.new params raise ArgumentError.new('Input is needed') unless params[:input] raise ArgumentError.new('Incorrect type param') unless [nil, 'hls', 'video', 'image'].include? params[:type] if params[:type] == 'hls' || File.extname(params[:input]).downcase == '.m3u8' VideoScreenshoter::Hls.new(params) elsif params[:type] == 'image' || ['.gif','.png','.jpg','.jpeg', '.png'].include?(File.extname(params[:input]).downcase) VideoScreenshoter::Image.new(params) else VideoScreenshoter::Video.new(params) end end