IMAAdsRequest Class Reference

Data class describing the ad request. More...

#import <IMAAdsRequest.h>

+ Inheritance diagram for IMAAdsRequest:

Instance Methods

(instancetype) - initWithAdsResponse:adDisplayContainer:avPlayerVideoDisplay:pictureInPictureProxy:userContext:
 Initializes an ads request instance with the given canned ads response and ad display container with Picture-in-Picture support. More...
 
(instancetype) - initWithAdsResponse:adDisplayContainer:contentPlayhead:userContext:
 Initializes an ads request instance with the given canned ads response and ad display container. More...
 
(instancetype) - initWithAdTagUrl:adDisplayContainer:avPlayerVideoDisplay:pictureInPictureProxy:userContext:
 Initializes an ads request instance with the given ad tag URL and ad display container with Picture-in-Picture support. More...
 
(instancetype) - initWithAdTagUrl:adDisplayContainer:contentPlayhead:userContext:
 Initializes an ads request instance with the given ad tag URL and ad display container. More...
 
(instancetype) - NS_UNAVAILABLE
 :nodoc: More...
 

Properties

NSString * adTagUrl
 Specifies the full URL to use for ads loading from an ad server. More...
 
NSString * adsResponse
 Specifies a VAST, VMAP, or ad rules response to be used instead of making a request via an ad tag URL. More...
 
IMAAdDisplayContaineradDisplayContainer
 The ad display container. More...
 
id userContext
 The user context. More...
 
BOOL adWillAutoPlay
 Specifies whether the player intends to start the content and ad in response to a user action or whether they will be automatically played. More...
 
BOOL adWillPlayMuted
 Specifies whether the player intends to start the content and ad with no volume. More...
 
float contentDuration
 Specifies the duration of the content in seconds to be shown. More...
 
NSArray< NSString * > * contentKeywords
 Specifies the keywords used to describe the content to be shown. More...
 
NSString * contentTitle
 Specifies the title of the content to be shown. More...
 
float vastLoadTimeout
 Specifies the VAST load timeout in milliseconds for the initial request and any subsequent wrappers. More...
 
float liveStreamPrefetchSeconds
 Specifies the maximum amount of time to wait in seconds, after calling requestAds, before requesting the ad tag URL. More...
 

Detailed Description

Data class describing the ad request.

Method Documentation

- (instancetype) initWithAdsResponse: (NSString *)  adsResponse
adDisplayContainer: (IMAAdDisplayContainer *)  adDisplayContainer
avPlayerVideoDisplay: (IMAAVPlayerVideoDisplay *)  avPlayerVideoDisplay
pictureInPictureProxy: (IMAPictureInPictureProxy *)  pictureInPictureProxy
userContext: (id)  userContext 

Initializes an ads request instance with the given canned ads response and ad display container with Picture-in-Picture support.

Serial ad requests may reuse the same IMAAdDisplayContainer by first calling [IMAAdsManager destroy] on its current adsManager. Concurrent requests must use different ad containers.

Parameters
adsResponsethe canned ads response
adDisplayContainerthe IMAAdDisplayContainer for rendering the ad UI
avPlayerVideoDisplaythe IMAAVPlayerVideoDisplay for rendering ads
pictureInPictureProxythe IMAPictureInPictureProxy for tracking PIP events
userContextthe user context for tracking requests (optional)
Returns
the IMAAdsRequest instance
- (instancetype) initWithAdsResponse: (NSString *)  adsResponse
adDisplayContainer: (IMAAdDisplayContainer *)  adDisplayContainer
contentPlayhead: (NSObject< IMAContentPlayhead > *)  contentPlayhead
userContext: (id)  NS_DESIGNATED_INITIALIZER 

Initializes an ads request instance with the given canned ads response and ad display container.

Serial ad requests may reuse the same IMAAdDisplayContainer by first calling [IMAAdsManager destroy] on its current adsManager. Concurrent requests must use different ad containers. Does not support Picture-in-Picture.

Parameters
adsResponsethe canned ads response
adDisplayContainerthe IMAAdDisplayContainer for rendering the ad UI
contentPlayheadthe IMAContentPlayhead for the content player (optional)
userContextthe user context for tracking requests (optional)
Returns
the IMAAdsRequest instance
- (instancetype) initWithAdTagUrl: (NSString *)  adTagUrl
adDisplayContainer: (IMAAdDisplayContainer *)  adDisplayContainer
avPlayerVideoDisplay: (IMAAVPlayerVideoDisplay *)  avPlayerVideoDisplay
pictureInPictureProxy: (IMAPictureInPictureProxy *)  pictureInPictureProxy
userContext: (id)  userContext 

Initializes an ads request instance with the given ad tag URL and ad display container with Picture-in-Picture support.

Serial ad requests may reuse the same IMAAdDisplayContainer by first calling [IMAAdsManager destroy] on its current adsManager. Concurrent requests must use different ad containers.

Parameters
adTagUrlthe ad tag URL
adDisplayContainerthe IMAAdDisplayContainer for rendering the ad UI
avPlayerVideoDisplaythe IMAAVPlayerVideoDisplay for rendering ads
pictureInPictureProxythe IMAPictureInPictureProxy for tracking PIP events
userContextthe user context for tracking requests (optional)
Returns
the IMAAdsRequest instance
- (instancetype) initWithAdTagUrl: (NSString *)  adTagUrl
adDisplayContainer: (IMAAdDisplayContainer *)  adDisplayContainer
contentPlayhead: (NSObject< IMAContentPlayhead > *)  contentPlayhead
userContext: (id)  NS_DESIGNATED_INITIALIZER 

Initializes an ads request instance with the given ad tag URL and ad display container.

Serial ad requests may reuse the same IMAAdDisplayContainer by first calling [IMAAdsManager destroy] on its current adsManager. Concurrent requests must use different ad containers. Does not support Picture-in-Picture.

Parameters
adTagUrlthe ad tag URL
adDisplayContainerthe IMAAdDisplayContainer for rendering the ad UI
contentPlayheadthe IMAContentPlayhead for the content player (optional)
userContextthe user context for tracking requests (optional)
Returns
the IMAAdsRequest instance
- (instancetype) NS_UNAVAILABLE

:nodoc:

Property Documentation

- (IMAAdDisplayContainer*) adDisplayContainer
readnonatomicstrong

The ad display container.

- (NSString*) adsResponse
readnonatomiccopy

Specifies a VAST, VMAP, or ad rules response to be used instead of making a request via an ad tag URL.

This can be useful for debugging and other situations in which an ad response is already available.

- (NSString*) adTagUrl
readnonatomiccopy

Specifies the full URL to use for ads loading from an ad server.

Required for any adsRequest. For details on constructing the ad tag url, see Create a master video tag manually.

- (BOOL) adWillAutoPlay
readwritenonatomicassign

Specifies whether the player intends to start the content and ad in response to a user action or whether they will be automatically played.

Changing this setting will have no impact on ad playback.

- (BOOL) adWillPlayMuted
readwritenonatomicassign

Specifies whether the player intends to start the content and ad with no volume.

Changing this setting will have no impact on ad playback.

- (float) contentDuration
readwritenonatomicassign

Specifies the duration of the content in seconds to be shown.

Used in AdX requests. This parameter is optional.

- (NSArray<NSString *>*) contentKeywords
readwritenonatomiccopy

Specifies the keywords used to describe the content to be shown.

Used in AdX requests. This parameter is optional.

- (NSString*) contentTitle
readwritenonatomiccopy

Specifies the title of the content to be shown.

Used in AdX requests. This parameter is optional.

- (float) liveStreamPrefetchSeconds
readwritenonatomicassign

Specifies the maximum amount of time to wait in seconds, after calling requestAds, before requesting the ad tag URL.

This can be used to stagger requests during a live-stream event, in order to mitigate spikes in the number of requests.

- (id) userContext
readnonatomicstrong

The user context.

- (float) vastLoadTimeout
readwritenonatomicassign

Specifies the VAST load timeout in milliseconds for the initial request and any subsequent wrappers.

This parameter is optional and will override the default timeout.


The documentation for this class was generated from the following file: