Module: Abrizer::InformationHelpers

Included in:
Canvas, Data
Defined in:
lib/abrizer/information_helpers.rb

Instance Method Summary collapse

Instance Method Details

#durationObject



4
5
6
7
# File 'lib/abrizer/information_helpers.rb', line 4

def duration
  informer = Abrizer::FfprobeInformer.new(mp4_filepath)
  informer.duration.to_f
end

#max_heightObject



17
18
19
# File 'lib/abrizer/information_helpers.rb', line 17

def max_height
  @adaptations.last.height
end

#max_widthObject



9
10
11
# File 'lib/abrizer/information_helpers.rb', line 9

def max_width
  @adaptations.last.width
end

#min_heightObject



21
22
23
# File 'lib/abrizer/information_helpers.rb', line 21

def min_height
  @adaptations.first.height
end

#min_widthObject



13
14
15
# File 'lib/abrizer/information_helpers.rb', line 13

def min_width
  @adaptations.first.width
end

#mp4_heightObject



29
30
31
# File 'lib/abrizer/information_helpers.rb', line 29

def mp4_height
  @adaptations[-2].height
end

#mp4_widthObject



25
26
27
# File 'lib/abrizer/information_helpers.rb', line 25

def mp4_width
  @adaptations[-2].width
end