Methods
Class Public methods
accept?(blob)
📝 Source code
# File activestorage/lib/active_storage/previewer/video_previewer.rb, line 5
def self.accept?(blob)
blob.video?
end
🔎 See on GitHub
Instance Public methods
preview()
📝 Source code
# File activestorage/lib/active_storage/previewer/video_previewer.rb, line 9
def preview
download_blob_to_tempfile do |input|
draw_relevant_frame_from input do |output|
yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png"
end
end
end
🔎 See on GitHub