IMAAdsLoader Class Reference

The IMAAdsLoader class allows the requesting of ads from the ad server. More...

#import <IMAAdsLoader.h>

+ Inheritance diagram for IMAAdsLoader:

Instance Methods

(instancetype) - initWithSettings:
 Initializes an IMAAdsLoader with specific settings. More...
 
(instancetype) - init
 Initializes the IMAAdsLoader with default settings. More...
 
(void) - requestAdsWithRequest:
 Request ads from the ad server. More...
 
(void) - requestStreamWithRequest:
 Request a stream with ads inserted dynamically. More...
 
(void) - contentComplete
 Signal to the SDK that the content has completed. More...
 

Class Methods

(NSString *) + sdkVersion
 Returns the SDK version. More...
 

Properties

IMASettingssettings
 SDK-wide settings. More...
 
id< IMAAdsLoaderDelegatedelegate
 Delegate that receives IMAAdsLoaderDelegate callbacks. More...
 

Detailed Description

The IMAAdsLoader class allows the requesting of ads from the ad server.

Use the delegate to receive the loaded ads or loading error in case of failure.

Method Documentation

- (void) contentComplete

Signal to the SDK that the content has completed.

The SDK will play post-rolls at this time, if any are scheduled.

- (instancetype) init

Initializes the IMAAdsLoader with default settings.

The loader takes 1-2 seconds to setup once initialized, therefore reusing a single instance of the ads loader is encouraged to minimize ad request times.

Returns
an IMAAdsLoader instance with default IMASettings
- (instancetype) initWithSettings: (IMASettings *)  settings

Initializes an IMAAdsLoader with specific settings.

The loader takes 1-2 seconds to setup once initialized, therefore reusing a single instance of the ads loader is encouraged to minimize ad request times.

Parameters
settingsthe IMASettings to use for SDK wide settings. Uses defaults when nil.
Returns
an IMAAdsLoader instance with given IMASettings
- (void) requestAdsWithRequest: (IMAAdsRequest *)  request

Request ads from the ad server.

The loader takes 1-2 seconds to setup on init and become ready to make ad requests. So reusing the same IMAAdsLoader instance is encouraged when making ad requests in order to minimize ad request times.

Parameters
requestthe IMAAdsRequest. If it was created for use with Picture-in-Picture, this IMAAdsLoader instance's IMASettings must have backround playback enabled
- (void) requestStreamWithRequest: (IMAStreamRequest *)  request

Request a stream with ads inserted dynamically.

Reusing the same IMAAdsLoader instance is encouraged when making stream requests in order to minimize stream request latency.

Parameters
requestthe stream request
+ (NSString *) sdkVersion

Returns the SDK version.

Returns
the SDK version

Property Documentation

- (id<IMAAdsLoaderDelegate>) delegate
readwritenonatomicweak

Delegate that receives IMAAdsLoaderDelegate callbacks.

- (IMASettings*) settings
readnonatomiccopy

SDK-wide settings.

Note that certain settings will only be evaluated during initialization of the adsLoader.


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