Class: Pageflow::ZencoderVideoOutputDefinition

Inherits:
ZencoderOutputDefinition show all
Defined in:
lib/pageflow/zencoder_video_output_definition.rb

Constant Summary collapse

MIN_SIZE_FOR_4K =
'1921x1080'.freeze
MIN_SIZE_FOR_FULLHD =
'1281x720'.freeze

Instance Attribute Summary collapse

Attributes inherited from ZencoderOutputDefinition

#options

Instance Method Summary collapse

Methods inherited from ZencoderOutputDefinition

#==

Constructor Details

#initialize(video_file, options = {}) ⇒ ZencoderVideoOutputDefinition

Returns a new instance of ZencoderVideoOutputDefinition.



10
11
12
13
# File 'lib/pageflow/zencoder_video_output_definition.rb', line 10

def initialize(video_file, options = {})
  super(options)
  @video_file = video_file
end

Instance Attribute Details

#video_fileObject (readonly)

Returns the value of attribute video_file.



5
6
7
# File 'lib/pageflow/zencoder_video_output_definition.rb', line 5

def video_file
  @video_file
end

Instance Method Details

#input_s3_urlObject



15
16
17
# File 'lib/pageflow/zencoder_video_output_definition.rb', line 15

def input_s3_url
  @video_file.attachment_s3_url
end

#outputsObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/pageflow/zencoder_video_output_definition.rb', line 19

def outputs
  [
    mp4_highdef_definitions,
    transferable(mp4_high_definition),
    transferable(mp4_medium_definition),
    transferable(mp4_low_definition),

    dash_definitions,
    hls_definitions,
    smil_definitions,

    thumbnails_definitions
  ].flatten
end