IMAAdsRenderingSettings
@interface IMAAdsRenderingSettings : NSObject
Set of properties that influence how ads are rendered.
-
If specified, the SDK will play the media with MIME type on the list. List of strings specifying the MIME types. When empty, the SDK will use its default list of MIME types supported on iOS. Example: @[ @“video/mp4”, @“application/x-mpegURL” ] The property is an empty array by default.
Declaration
Swift
var mimeTypes: [String]? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSString *> *mimeTypes;
-
Maximum recommended bitrate. The value is in kbit/s. SDK will pick media with bitrate below the specified max, or the closest bitrate if there is no media with smaller bitrate found. Default value, |kIMAAutodetectBitrate|, means the bitrate will be selected by the SDK, using the currently detected network speed (cellular or Wi-Fi).
Declaration
Swift
var bitrate: Int { get set }
Objective-C
@property (nonatomic) NSInteger bitrate;
-
Timeout (in seconds) when loading a video ad media file. If loading takes longer than this timeout, the ad playback is canceled and the next ad in the pod plays, if available. Use -1 for the default of 8 seconds.
Declaration
Swift
var loadVideoTimeout: TimeInterval { get set }
Objective-C
@property (nonatomic) NSTimeInterval loadVideoTimeout;
-
For VMAP and ad rules playlists, only play ad breaks scheduled after this time (in seconds). This setting is strictly after the specified time. For example, setting playAdsAfterTime to 15 will ignore an ad break scheduled to play at 15s.
Declaration
Swift
var playAdsAfterTime: TimeInterval { get set }
Objective-C
@property (nonatomic) NSTimeInterval playAdsAfterTime;
-
Specifies the list of UI elements that should be visible. This property may be ignored for AdSense/AdX ads. For valid values, see IMAUiElementType. This field is ignored on tvOS, where UI elements are unavailable.
Declaration
Swift
var uiElements: [NSNumber]? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSNumber *> *uiElements;
-
Whether or not the SDK will preload ad media. Default is YES.
Declaration
Swift
var enablePreloading: Bool { get set }
Objective-C
@property (nonatomic) BOOL enablePreloading;
-
Specifies the optional UIViewController that will be used to open links in-app. When nil, tapping the video ad “Learn More” button or companion ads will result in opening Safari browser. Setting this allows the SDK to open links in-app. This field is ignored on tvOS, where Safari is not available.
Declaration
Swift
weak var linkOpenerPresentingController: UIViewController? { get set }
Objective-C
@property (nonatomic, weak, nullable) UIViewController *linkOpenerPresentingController;
-
The IMALinkOpenerDelegate to be notified when a link is opened/closed. Web links are unavailable on tvOS, but this delegate will be used to notify for deep links.
Declaration
Swift
weak var linkOpenerDelegate: (any IMALinkOpenerDelegate)? { get set }
Objective-C
@property (nonatomic, weak, nullable) id<IMALinkOpenerDelegate> linkOpenerDelegate;