0
我有3個版本的視頻。如果主要質量失敗,則顯示可用的視頻質量
問題:
我需要顯示視頻的可用質量,如果主要質量不工作或無法啓動。它是如何做到的?
version :high_mp4 do
process encode_video: [:mp4, encode_params("720x720", HIGH_PARAMS).merge(version: Video::HIGH_VERSION) ]
def full_filename(for_file=file)
super.chomp(File.extname(super)) + '.mp4'
end
end
version :medium_mp4 do
process encode_video: [:mp4, encode_params("480x480", MEDIUM_PARAMS).merge(version: Video::MEDIUM_VERSION)]
def full_filename(for_file=file)
super.chomp(File.extname(super)) + '.mp4'
end
end
version :low_mp4 do
process encode_video: [:mp4, encode_params("320x320", LOW_PARAMS).merge(version: Video::LOW_VERSION)]
def full_filename(for_file=file)
super.chomp(File.extname(super)) + '.mp4'
end
end
觀點:
= video.file.medium_mp4.url