Packagecom.adobe.mediacore.timeline.advertising
Classpublic final class Ad
InheritanceAd Inheritance Object

Class holding all ad related information.



Public Properties
 PropertyDefined By
  companionAssets : Vector.<AdAsset>
[read-only] Companion assets associated with this ad.
Ad
  duration : uint
[read-only] The declared duration of the ad in milliseconds.
Ad
  id : String
[read-only] The ad identifier.
Ad
  primaryAsset : AdAsset
[read-only] Primary asset of the ad.
Ad
  tracker : ContentTracker
[read-only] Analytics provider for this ad.
Ad
  type : String
[read-only] The ad type (linear, non-linear, etc).
Ad
Public Methods
 MethodDefined By
  
Ad(id:String, type:String, duration:uint, primaryAsset:AdAsset, companionAssets:Vector.<AdAsset>, tracker:ContentTracker = null)
Default constructor.
Ad
  
createCustomAdMarker(type:String, duration:Number, id:String, primaryAdAsset:AdAsset):Ad
[static]
Ad
  
equals(otherAd:Ad):Boolean
Checks if this ad is equal with the specified one.
Ad
  
linearFromAsset(id:String, primaryAsset:AdAsset, companionAssets:Vector.<AdAsset>, tracker:ContentTracker = null):Ad
[static] Helper method for ad creation.
Ad
  
toString():String
Ad
Property Detail
companionAssetsproperty
companionAssets:Vector.<AdAsset>  [read-only]

Companion assets associated with this ad. This method returns a copy of the companion assets in order to prevent accidental updating of the vector.


Implementation
    public function get companionAssets():Vector.<AdAsset>
durationproperty 
duration:uint  [read-only]

The declared duration of the ad in milliseconds.


Implementation
    public function get duration():uint
idproperty 
id:String  [read-only]

The ad identifier. This value is important for ad tracking purposes and it is set only once when it is created by the ad resolving library.


Implementation
    public function get id():String
primaryAssetproperty 
primaryAsset:AdAsset  [read-only]

Primary asset of the ad.


Implementation
    public function get primaryAsset():AdAsset
trackerproperty 
tracker:ContentTracker  [read-only]

Analytics provider for this ad.


Implementation
    public function get tracker():ContentTracker
typeproperty 
type:String  [read-only]

The ad type (linear, non-linear, etc). Ad types are defined in the AdType class and they dictate how the ad will be affecting the playback timeline.


Implementation
    public function get type():String

See also

Constructor Detail
Ad()Constructor
public function Ad(id:String, type:String, duration:uint, primaryAsset:AdAsset, companionAssets:Vector.<AdAsset>, tracker:ContentTracker = null)

Default constructor.

Parameters
id:String — Ad unique identifier.
 
type:String — Ad type.
 
duration:uint — Ad duration in milliseconds.
 
primaryAsset:AdAsset — The primary asset of the ad.
 
companionAssets:Vector.<AdAsset> — The companion assets of the ad.
 
tracker:ContentTracker (default = null) — Content tracker instance which will be used for tracking events associated with this ad.
Method Detail
createCustomAdMarker()method
public static function createCustomAdMarker(type:String, duration:Number, id:String, primaryAdAsset:AdAsset):Ad

Parameters

type:String
 
duration:Number
 
id:String
 
primaryAdAsset:AdAsset

Returns
Ad
equals()method 
public function equals(otherAd:Ad):Boolean

Checks if this ad is equal with the specified one.

Parameters

otherAd:Ad

Returns
Boolean — true if the two ads are equal and false otherwise.
linearFromAsset()method 
public static function linearFromAsset(id:String, primaryAsset:AdAsset, companionAssets:Vector.<AdAsset>, tracker:ContentTracker = null):Ad

Helper method for ad creation. This method will create an ad using primary asset properties as default properties for the ad.

Parameters

id:String — Ad unique identifier.
 
primaryAsset:AdAsset — The primary asset of the ad.
 
companionAssets:Vector.<AdAsset> — The companion assets of the ad.
 
tracker:ContentTracker (default = null) — Content tracker instance which will be used for tracking events associated with this ad.

Returns
Ad — a valid Ad instance
toString()method 
public function toString():String

Returns
String