Sha256: bfbd5ee5a0c0606d8665b07796775967b3d762fac562c1c293437ace6c7253e6
Contents?: true
Size: 1022 Bytes
Versions: 8
Compression:
Stored size: 1022 Bytes
Contents
module Pageflow class ZencoderAudioOutputDefinition < ZencoderOutputDefinition attr_reader :audio_file def initialize(audio_file, options = {}) super(options) @audio_file = audio_file end def input_s3_url @audio_file.attachment_s3_url end def outputs [ s3_and_transfer(m4a_definition), s3_and_transfer(mp3_definition), s3_and_transfer(ogg_definition) ].flatten end private def m4a_definition { :label => 'm4a', :format => 'm4a', :path => audio_file.m4a.path, :public => 1, :headers => { 'Content-Type' => 'audio/mp4' } } end def mp3_definition { :label => 'mp3', :format => 'mp3', :path => audio_file.mp3.path, :public => 1 } end def ogg_definition { :label => 'ogg', :format => 'ogg', :path => audio_file.ogg.path, :public => 1 } end end end
Version data entries
8 entries across 8 versions & 1 rubygems