pub struct MediaFile<'a> {Show 15 fields
pub id: Option<Cow<'a, str>>,
pub delivery: DeliveryProtocol,
pub mime_type: Cow<'a, str>,
pub width: i32,
pub height: i32,
pub codec: Option<Cow<'a, str>>,
pub bitrate: Option<i32>,
pub min_bitrate: Option<i32>,
pub max_bitrate: Option<i32>,
pub scalable: Option<bool>,
pub maintain_aspect_ratio: Option<bool>,
pub file_size: Option<i32>,
pub media_type: Option<Cow<'a, str>>,
pub api_framework: Option<Cow<'a, str>>,
pub uri: Cow<'a, str>,
}
Expand description
In VAST 4.x <MediaFile>
should only be used to contain the video or audio file for a
Linear
ad.
<xs:element name="MediaFile">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attribute name="id" type="xs:string" use="optional">
<xs:attribute name="delivery" use="required">
<xs:attribute name="type" type="xs:string" use="required">
<xs:attribute name="width" type="xs:integer" use="required">
<xs:attribute name="height" type="xs:integer" use="required">
<xs:attribute name="codec" type="xs:string" use="optional">
<xs:attribute name="bitrate" type="xs:integer" use="optional">
<xs:attribute name="minBitrate" type="xs:integer" use="optional">
<xs:attribute name="maxBitrate" type="xs:integer" use="optional">
<xs:attribute name="scalable" type="xs:boolean" use="optional">
<xs:attribute name="maintainAspectRatio" type="xs:boolean" use="optional">
<xs:attribute name="fileSize" type="xs:integer" use="optional">
<xs:attribute name="mediaType" type="xs:string" use="optional">
<xs:attribute name="apiFramework" type="xs:string" use="optional">
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
Fields§
§id: Option<Cow<'a, str>>
An identifier for the media file.
delivery: DeliveryProtocol
Either “progressive” for progressive download protocols (such as HTTP) or “streaming” for streaming protocols.
mime_type: Cow<'a, str>
MIME type for the file container. Popular MIME types include, but are not limited to “video/mp4” for MP4, “audio/mpeg” and “audio/aac” for audio ads.
width: i32
The native width of the video file, in pixels. (0 for audio ads)
height: i32
The native height of the video file, in pixels. (0 for audio ads)
codec: Option<Cow<'a, str>>
The codec used to encode the file which can take values as specified by RFC 4281.
bitrate: Option<i32>
For progressive load video or audio, the bitrate
value specifies the average
bitrate for the media file; otherwise the minBitrate
and maxBitrate
can be
used together to specify the minimum and maximum bitrates for streaming
videos or audio files.
min_bitrate: Option<i32>
The minBitrate
is minimum bitrate for streaming videos or audio files.
Can be used with maxBitrate
to specify bitrate.
max_bitrate: Option<i32>
The maxBitrate
is maximum bitrate for streaming videos or audio files.
Can be used with minBitrate
to specify bitrate.
scalable: Option<bool>
A Boolean value that indicates whether the media file is meant to scale to larger dimensions.
maintain_aspect_ratio: Option<bool>
A Boolean value that indicates whether aspect ratio for media file dimensions should be maintained when scaled to new dimensions.
file_size: Option<i32>
Optional field that helps eliminate the need to calculate the size based on bitrate and duration. Units - Bytes
media_type: Option<Cow<'a, str>>
Type of media file (2D / 3D / 360 / etc). Optional. Default value = 2D
api_framework: Option<Cow<'a, str>>
Identifies the API needed to execute an interactive media file,
but current support is for backward compatibility. Please use the
<InteractiveCreativeFile>
element to
include files that require an API for execution.
uri: Cow<'a, str>
A CDATA-wrapped URI to a media file.