Class: Pageflow::Vr::ProjectionAutoDetection

Inherits:
Object
  • Object
show all
Defined in:
lib/pageflow/vr/projection_auto_detection.rb

Instance Method Summary collapse

Instance Method Details

#call(options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/pageflow/vr/projection_auto_detection.rb', line 4

def call(options)
  file = options[:file]
  return unless file.is_a?(VideoFile) && file.usages.any?

  usage = file.usages.first

  if dimension_present?(file) && auto_detection_enabled?(usage)
    update(usage, file)
  end
end