Module: EncodingDotCom::AttributeRestrictionsMp4

Defined in:
lib/encoding_dot_com/attribute_restrictions.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#validate_video_codecObject



37
38
39
40
41
42
# File 'lib/encoding_dot_com/attribute_restrictions.rb', line 37

def validate_video_codec
  allowed_codecs = %w{mpeg4 libx264}
  unless video_codec.nil? || allowed_codecs.include?(video_codec)
    raise IllegalFormatAttribute.new("Video codec can only be one of #{allowed_codecs.join(',')} but was #{video_codec}")
  end
end