Class: Ad

Ad

Represents an ad or a set of podded ads. This object contains a reference to the actual ad object provided by the ad manager. Constructor: Represents an ad or a set of podded ads. This object contains a reference to the actual ad object provided by the ad manager.
Initialize an instance of the current class using the new keyword along with this constructor.
Parameters:
Name Type Description
adData object The ad data object describes the ad, it must contain the following fields:
position {number} The time, in seconds, in the video at which the ad(s) will play.
duration {number} The duration of the ad(s) (seconds).
adManager {string} The name of the ad manager ({adManager}.name) that will play the ad.
ad {object} The ad object.
adType {string} The type of ad created (e.g. {AdManagerController}.ADTYPE.LINEAR_VIDEO).
Properties:
Name Type Description
id string A unique ID for the ad.
position number The position in the stream at which to play the ad (seconds).
duration number The duration of the ad (seconds).
adManager string The name of the ad manager that owns the ad.
ad object The ad object.
isLinear boolean true if the ad is linear, false otherwise.
played boolean true if the ad has been played during the current video, false otherwise.
videoRestrictions object An object that lists restrictions the ad manager has on the video plugin used. ex. {"technology":OO.VIDEO.TECHNOLOGY.HTML5, "features":[OO.VIDEO.FEATURE.VIDEO_OBJECT_OPEN]}
Example
var amc = new AdManagerController(mb, id);
var ad = new amc.Ad({position:10000, duration:7000, adManager:"example-ad-manager", ad:adObj,
                     adType:amc.ADTYPE.LINEAR_VIDEO});