Class: Animoto::Assets::Footage
- Defined in:
- lib/animoto/assets/footage.rb
Instance Attribute Summary collapse
-
#audio_mix ⇒ Boolean
Whether or not to mix the audio of this footage with the video’s soundtrack.
-
#cover ⇒ Boolean
writeonly
Whether or not this footage is the cover of the video.
-
#duration ⇒ Float
The duration in seconds of how long this footage should run in the video.
-
#rotation ⇒ Integer
The number of clockwise 90-degree rotations that should be applied to this video.
-
#start_time ⇒ Float
The time in seconds of where to start extracting a clip from this footage to add to the video.
Attributes inherited from Base
Instance Method Summary collapse
-
#cover? ⇒ Boolean
Returns whether or not this footage is marked as the cover.
-
#initialize(source, options = {}) ⇒ Assets::Footage
constructor
Creates a new Footage object.
-
#to_hash ⇒ Hash{String=>Object}
Returns a representation of this Footage as a Hash.
Constructor Details
#initialize(source, options = {}) ⇒ Assets::Footage
Creates a new Footage object.
42 43 44 45 46 47 48 49 |
# File 'lib/animoto/assets/footage.rb', line 42 def initialize source, = {} super @audio_mix = [:audio_mix] @start_time = [:start_time] @duration = [:duration] @rotation = [:rotation] @cover = [:cover] end |
Instance Attribute Details
#audio_mix ⇒ Boolean
Whether or not to mix the audio of this footage with the video’s soundtrack.
6 7 8 |
# File 'lib/animoto/assets/footage.rb', line 6 def audio_mix @audio_mix end |
#cover=(value) ⇒ Boolean (writeonly)
Whether or not this footage is the cover of the video. If this piece of footage is the video’s cover, the cover image will be generated from a frame in this footage.
24 25 26 |
# File 'lib/animoto/assets/footage.rb', line 24 def cover=(value) @cover = value end |
#duration ⇒ Float
The duration in seconds of how long this footage should run in the video.
15 16 17 |
# File 'lib/animoto/assets/footage.rb', line 15 def duration @duration end |
#rotation ⇒ Integer
The number of clockwise 90-degree rotations that should be applied to this video.
19 20 21 |
# File 'lib/animoto/assets/footage.rb', line 19 def rotation @rotation end |
#start_time ⇒ Float
The time in seconds of where to start extracting a clip from this footage to add to the video.
11 12 13 |
# File 'lib/animoto/assets/footage.rb', line 11 def start_time @start_time end |
Instance Method Details
#cover? ⇒ Boolean
Returns whether or not this footage is marked as the cover.
28 29 30 |
# File 'lib/animoto/assets/footage.rb', line 28 def cover? @cover end |
#to_hash ⇒ Hash{String=>Object}
Returns a representation of this Footage as a Hash.
55 56 57 58 59 60 61 62 63 |
# File 'lib/animoto/assets/footage.rb', line 55 def to_hash hash = super hash['audio_mix'] = audio_mix if audio_mix hash['start_time'] = start_time if start_time hash['duration'] = duration if duration hash['rotation'] = rotation if rotation hash['cover'] = cover? unless @cover.nil? hash end |