APSVASTAdBreak

Objective-C

@interface APSVASTAdBreak : APSMediaEvent <NSCopying, APSMediaTrackableObject>

Swift

class APSVASTAdBreak : APSMediaEvent, NSCopying, APSMediaTrackableObject

An APSVASTAdBreak object defines an ad break for which the builder plugin will try to generate APSMediaUnits and insert them into the playlist.

Main Configuration

  • An array of NSString objects indicating the VAST URLs that will be called in order to populate the ad break with ads.

    Declaration

    Objective-C

    @property (nonatomic) NSArray<NSString *> *_Nonnull sources;

    Swift

    var sources: [String] { get set }
  • The ad break type. Specifies how the rezulting APSMediaUnits and APSMediaOverlays need to be placed relative to the main content units. See APSVASTConfigurationOptions for more details about the possible values.

    Declaration

    Objective-C

    @property (nonatomic) APSVASTAdBreakType type;

    Swift

    var type: APSVASTAdBreakType { get set }
  • The number of ads in this adBreak

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger adCount;

    Swift

    var adCount: Int { get }
  • An identifier used to correlate a chain of ad requests from the origination (supply) end.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nullable transactionId;

    Swift

    var transactionId: String? { get }
  • The Apple IDFA or similar ad identifier

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nullable advertisingIdentifier;

    Swift

    var advertisingIdentifier: String? { get }
  • Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nullable advertisingIdentifierType;

    Swift

    var advertisingIdentifierType: String? { get }
  • Whether to limit ad tracking or not

    Declaration

    Objective-C

    @property (readonly) BOOL isAdTrackingLimited;

    Swift

    var isAdTrackingLimited: Bool { get }
  • GPS location coordinates in format lat,lon

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nullable locationCoordinates;

    Swift

    var locationCoordinates: String? { get }
  • A string format that defines when midrolls and nonlinear ads should be inserted mid-unit for each content unit.

    The expected format for this property is: “seconds” or “percentage%”.

    Declaration

    Objective-C

    @property (nonatomic) NSString *_Nullable adOffset;

    Swift

    var adOffset: String? { get set }
  • Defines the time interval in seconds after which the ad break will be repeated.

    Declaration

    Objective-C

    @property (nonatomic) NSTimeInterval repeatAfter;

    Swift

    var repeatAfter: TimeInterval { get set }
  • The user agent that should be used when making HTTP requests.

    Declaration

    Objective-C

    @property (nonatomic) NSString *_Nullable userAgent;

    Swift

    var userAgent: String? { get set }
  • Delegate object

    Declaration

    Objective-C

    @property (nonatomic, weak) id<APSVASTAdBreakDelegate> _Nullable delegate;

    Swift

    weak var delegate: APSVASTAdBreakDelegate? { get set }
  • Configure an AdBreak from a dictionary structure.

    Declaration

    Objective-C

    - (void)configureFromDictionary:(NSDictionary *_Nonnull)configuration;

    Swift

    func configure(from configuration: [AnyHashable : Any])

    Parameters

    configuration

    Configuration dictionary.

Configuring the Playback Controls Bar

  • Specifies how the controls bar will be displayed on top of video ads.

    See APSMediaControlsDisplay for more details. Defaults to APSMediaControlsDisplayNone.

    Declaration

    Objective-C

    @property (nonatomic) APSMediaControlsDisplay controlsDisplayForAds;

    Swift

    var controlsDisplayForAds: APSMediaControlsDisplay { get set }
  • The configuration for the controls bar overlay on top of video ads.

    See [APSMediaUnit controlsParameters] for details on creating this dictionary.

    Declaration

    Objective-C

    @property (nonatomic) NSDictionary *_Nullable controlsParametersForAds;

    Swift

    var controlsParametersForAds: [AnyHashable : Any]? { get set }

VAST 3.0 Icon Support

  • Icons are rendered to a height that’s proportional to the current player view height. This property defines the percentage of the current height to render ads to, while preserving the original aspect ration in calculating the rendered width.

    Defaults to 10.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat defaultIconHeightPercentage;

    Swift

    var defaultIconHeightPercentage: CGFloat { get set }
  • The fade-in animation duration for displaying icons, in seconds.

    Defaults to 0.5.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat iconFadeInDuration;

    Swift

    var iconFadeInDuration: CGFloat { get set }

Skip Button Configuration

Fullscreen Button Configuration

  • Holds the configuration object for the fullscreen button that appears on top of video ads.

    Declaration

    Objective-C

    @property (nonatomic) APSVASTFullscreenButtonConfiguration *_Nonnull fullscreenButtonConfiguration;

    Swift

    var fullscreenButtonConfiguration: APSVASTFullscreenButtonConfiguration { get set }

Countdown to Next Unit Overlay Configuration

Non-linear Ads Configuration

Ad Retrieval Settings

  • Defines whether the break should allow more than one ad to be played, even if more ads are retrieved.

    Declaration

    Objective-C

    @property (nonatomic) BOOL allowMultipleAds;

    Swift

    var allowMultipleAds: Bool { get set }
  • Defines whether VAST Wrappers should be followed for the given URL sources.

    Declaration

    Objective-C

    @property (nonatomic) BOOL followWrappers;

    Swift

    var followWrappers: Bool { get set }
  • Defines the number of wrappers to be received with no Inline response.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger wrappersCountLimit;

    Swift

    var wrappersCountLimit: Int { get set }
  • The VMAP standard permits allowing only one ad from a certain ad source. This constant defines how the VAST builder plugin deals with situations when multiple valid ads are retrieved from a source that is disallowed to load several ads at one time.

    See APSResolvMultipleAdsConflictsBy for possible values. Defaults to APSResolvMultipleAdsConflictsBySelectingFirst.

    Declaration

    Objective-C

    @property (nonatomic) APSResolvMultipleAdsConflictsBy multipleAdsConflictsPolicy;

    Swift

    var multipleAdsConflictsPolicy: APSResolvMultipleAdsConflictsBy { get set }
  • VAST 3.0 defines Ad Pods, with fallback mechanisms that allow loading an ad buffet of commercials to playback if the main ads fail. This value specifies how to treat backwards compatibility issues with VAST 2.0 and 1.0, by choosing what ads are promoted to the main Ad Pod if no valid Pods are detected.

    See APSAdPodFallback for possible values. Defaults to APSAdPodFallbackSelectAll.

    Declaration

    Objective-C

    @property (nonatomic) APSAdPodFallback adPodFallbackStrategy;

    Swift

    var adPodFallbackStrategy: APSAdPodFallback { get set }
  • An array that defines the mime-types supported when choosing a media file from the VAST response.

    Items are ordered from most preferred to least preferred. The default value for this property is @[@"audio/mpeg", @"audio/mp3", @"audio/aac", @"audio/mp4", @"audio/flac", @"mobile/m3u8",@"application/x-mpegURL",@"application/vnd.apple.mpegURL",@"vnd.apple.mpegURL",@"video/m3u8",@"mobile/mp4",@"video/mp4"]

    Declaration

    Objective-C

    @property (nonatomic) NSArray<NSString *> *_Nonnull prefferedVideoMimeTypes;

    Swift

    var prefferedVideoMimeTypes: [String] { get set }

Other Configurations

  • 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 }
  • A list of blocked ad categories from wrappers

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSString *> *_Nullable blockedAdCategories;

    Swift

    var blockedAdCategories: [String]? { get }
  • The ad video clip scaling mode, relative to the player surface.

    Defaults to APSMovieScalingModeAspectFit.

    Declaration

    Objective-C

    @property (nonatomic) APSMovieScalingMode scalingMode;

    Swift

    var scalingMode: APSMovieScalingMode { get set }
  • Defines if the pinch-to-fullscreen gesture should be activated for generated video ads.

    Defaults to YES;

    Declaration

    Objective-C

    @property (nonatomic) BOOL allowPinchToFullscreen;

    Swift

    var allowPinchToFullscreen: Bool { get set }
  • Defines the behavior of the player after a banner ad is tapped and the built-in web browser is dismissed.

    Declaration

    Objective-C

    @property (nonatomic) APSWebviewDismissedAction afterBannerTapped;

    Swift

    var afterBannerTapped: APSWebviewDismissedAction { get set }
  • Defines the behavior of the player after a video ad is tapped and the built-in web browser is dismissed.

    Declaration

    Objective-C

    @property (nonatomic) APSWebviewDismissedAction afterVideoAdTapped;

    Swift

    var afterVideoAdTapped: APSWebviewDismissedAction { get set }
  • Defines if the break should log debug information to the console.

    Declaration

    Objective-C

    @property (nonatomic) BOOL debug;

    Swift

    var debug: Bool { get set }