Sha256: ea27fc1b46bc57b1ecfa222016b903eb2169985a4920e22a99f3086358f16cdd

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

module Animoto
  module Assets
    class Footage < Animoto::Assets::Base
      include Support::Visual
      include Support::Coverable
      
      # Whether or not to mix the audio of this footage with the video's soundtrack.
      # @return [Boolean]
      attr_accessor :audio_mix
      
      # The time in seconds of where to start extracting a clip from this footage to
      # add to the video.
      # @return [Float]
      attr_accessor :start_time
      
      # The duration in seconds of how long this footage should run in the video.
      # @return [Float]
      attr_accessor :duration
    
      # Returns a representation of this Footage as a Hash.
      #
      # @return [Hash<String,Object>] this asset as a Hash
      # @see Animoto::Support::Visual#to_hash
      # @see Animoto::Assets::Base#to_hash
      def to_hash
        hash = super
        hash['audio_mix'] = 'MIX' if audio_mix
        hash['start_time'] = start_time if start_time
        hash['duration'] = duration if duration
        hash 
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
animoto-0.1.1.beta1 ./lib/animoto/assets/footage.rb
animoto-0.1.0.beta1 ./lib/animoto/assets/footage.rb
animoto-0.1.0.beta0 ./lib/animoto/assets/footage.rb