APSVASTMediaBuilderPlugin
Objective-C
@interface APSVASTMediaBuilderPlugin : NSObject <APSMediaBuilderPlugin>
Swift
class APSVASTMediaBuilderPlugin : NSObject, APSMediaBuilderPlugin
The VAST Media Builder plugin extends an APSMediaBuilder
object by inserting preroll, postroll, midroll and non-linear ad breaks, loaded from VAST 1.0, VAST 2.0, VAST 3.0 and VMAP 1.0 sources.
Use the [APSMediaBuilder addPlugin:]
method to attach an APSVASTMediaBuilderPlugin
object to a media builder.
Configuration of the plugin can be done in three ways:
- programatically configure the plugin object, using available properties;
- configure the plugin object directly, using a dictionary - see
[APSMediaBuilderPlugin configureFromDictionary:]
; - configure the plugin with JSON. This is done as part of the
APSMediaBuilder
object configuration from JSON or from a dictionary. If the supplied configuration dictionary or interpreted JSON dictionary contains the “ads” key, then the corresponding value dictionary for that key will be provided to the plugin for configuration.
-
The VMAP 1.0 URL that should be used to configure ad breaks.
Declaration
Objective-C
@property (nonatomic) NSURL *_Nullable vmapURL;
Swift
var vmapURL: URL? { get set }
-
The template object that holds default parameter values for ad breaks created from VMAP or VAST.
Declaration
Objective-C
@property (nonatomic) APSVASTAdBreak *_Nonnull adBreakTemplate;
Swift
var adBreakTemplate: APSVASTAdBreak { get set }
-
The currently defined ad breaks that the plugin will try to fill.
Declaration
Objective-C
@property (nonatomic) NSArray<APSVASTAdBreak *> *_Nullable adBreaks;
Swift
var adBreaks: [APSVASTAdBreak]? { get set }
-
When loading ads via VMAP and using ad break positioning via “#”, this array defines the available, pre-defined positions that ads can be inserted at.
Positions are defined using strings that can either specify absolute time intervals in seconds (e.g.: @“10”) or percentual values, relative to the full playback time (e.g.: @“50%”). Defaults to
@[@"5", @"75%"]
.Declaration
Objective-C
@property (nonatomic) NSArray *_Nonnull defaultAdBreakPositions;
Swift
var defaultAdBreakPositions: [Any] { get set }
-
List of desired ad categories. Encoded with IABN-N values as specified in the “Content Categories” list of AdCOM 1.0.
Declaration
Objective-C
@property (nonatomic) NSArray<NSString *> *_Nullable desiredAdCategories;
Swift
var desiredAdCategories: [String]? { get set }
-
Delegate for APSVASTAdBreak instances generated by this builder
Declaration
Objective-C
@property (nonatomic, weak) id<APSVASTAdBreakDelegate> _Nullable adBreakDelegate;
Swift
weak var adBreakDelegate: APSVASTAdBreakDelegate? { get set }