Class: VAST::Mediafile
Overview
Any number of Mediafile objects can be provided for a single Ad, but it is assumed that all Mediafiles belongs to a single Ad object represent the same creative unit with the same duration, Ad-ID (ISCI code), etc.
Instance Attribute Summary
Attributes inherited from Element
Instance Method Summary collapse
-
#api_framework ⇒ Object
Defines the method to use for communication with the companion.
-
#bitrate ⇒ Object
Bitrate of encoded video in Kbps.
-
#delivery ⇒ Object
Method of delivery of ad, either “streaming” or “progressive”.
-
#height ⇒ Object
Pixel dimensions of video height.
- #id ⇒ Object
-
#maintain_aspect_ratio? ⇒ Boolean
Whether the mediafile must have its aspect ratio maintained when scaled.
-
#scalable? ⇒ Boolean
Whether it is acceptable to scale the mediafile.
-
#type ⇒ Object
MIME type.
-
#url ⇒ Object
Location of linear file.
-
#width ⇒ Object
Pixel dimensions of video width.
Methods inherited from Element
Constructor Details
This class inherits a constructor from VAST::Element
Instance Method Details
#api_framework ⇒ Object
Defines the method to use for communication with the companion
42 43 44 |
# File 'lib/vast/mediafile.rb', line 42 def api_framework source_node[:apiFramework] end |
#bitrate ⇒ Object
Bitrate of encoded video in Kbps
27 28 29 |
# File 'lib/vast/mediafile.rb', line 27 def bitrate source_node[:bitrate].to_i end |
#delivery ⇒ Object
Method of delivery of ad, either “streaming” or “progressive”
16 17 18 |
# File 'lib/vast/mediafile.rb', line 16 def delivery source_node[:delivery] end |
#height ⇒ Object
Pixel dimensions of video height
37 38 39 |
# File 'lib/vast/mediafile.rb', line 37 def height source_node[:height].to_i end |
#id ⇒ Object
11 12 13 |
# File 'lib/vast/mediafile.rb', line 11 def id source_node[:id] end |
#maintain_aspect_ratio? ⇒ Boolean
Whether the mediafile must have its aspect ratio maintained when scaled
52 53 54 |
# File 'lib/vast/mediafile.rb', line 52 def maintain_aspect_ratio? source_node[:maintainAspectRatio]=="true" end |
#scalable? ⇒ Boolean
Whether it is acceptable to scale the mediafile.
47 48 49 |
# File 'lib/vast/mediafile.rb', line 47 def scalable? source_node[:scalable]=="true" end |
#type ⇒ Object
MIME type. Popular MIME types include, but are not limited to “video/x-ms-wmv” for Windows Media, and “video/x-flv” for Flash Video.
22 23 24 |
# File 'lib/vast/mediafile.rb', line 22 def type source_node[:type] end |
#url ⇒ Object
Location of linear file
7 8 9 |
# File 'lib/vast/mediafile.rb', line 7 def url URI.parse source_node.content.strip end |
#width ⇒ Object
Pixel dimensions of video width
32 33 34 |
# File 'lib/vast/mediafile.rb', line 32 def width source_node[:width].to_i end |