class VAST::Mediafile
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.
Public Instance Methods
api_framework()
click to toggle source
Defines the method to use for communication with the companion
# File lib/vast/mediafile.rb, line 42 def api_framework source_node[:apiFramework] end
bitrate()
click to toggle source
Bitrate of encoded video in Kbps
# File lib/vast/mediafile.rb, line 27 def bitrate source_node[:bitrate].to_i end
delivery()
click to toggle source
Method of delivery of ad, either “streaming” or “progressive”
# File lib/vast/mediafile.rb, line 16 def delivery source_node[:delivery] end
height()
click to toggle source
Pixel dimensions of video height
# File lib/vast/mediafile.rb, line 37 def height source_node[:height].to_i end
id()
click to toggle source
# File lib/vast/mediafile.rb, line 11 def id source_node[:id] end
maintain_aspect_ratio?()
click to toggle source
Whether the mediafile must have its aspect ratio maintained when scaled
# File lib/vast/mediafile.rb, line 52 def maintain_aspect_ratio? source_node[:maintainAspectRatio]=="true" end
scalable?()
click to toggle source
Whether it is acceptable to scale the mediafile.
# File lib/vast/mediafile.rb, line 47 def scalable? source_node[:scalable]=="true" end
type()
click to toggle source
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.
# File lib/vast/mediafile.rb, line 22 def type source_node[:type] end
url()
click to toggle source
Location of linear file
# File lib/vast/mediafile.rb, line 7 def url URI.parse source_node.content.strip end
width()
click to toggle source
Pixel dimensions of video width
# File lib/vast/mediafile.rb, line 32 def width source_node[:width].to_i end