GoogleInteractiveMediaAds Framework Reference

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 nil or 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 (readwrite, copy, nonatomic) 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 (assign, readwrite, 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 (assign, readwrite, 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 (assign, readwrite, 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 (readwrite, copy, nonatomic) NSArray<NSNumber *> *uiElements;
  • Specifies the optional UIViewController that will be used to present an in-app browser. When nil, tapping the video ad Learn More button or companion ads will result in opening Safari browser. If provided, in-app browser will be used, allowing the user to stay in the app and return easily. This field is ignored on tvOS, where Safari is not available.

    Declaration

    Swift

    weak var webOpenerPresentingController: UIViewController! { get set }

    Objective-C

    @property (readwrite, nonatomic) UIViewController *webOpenerPresentingController;
  • The IMAWebOpenerDelegate to be notified when in-app or external browser opens/closes. This field is ignored on tvOS, where Safari is not available.

    Declaration

    Swift

    weak var webOpenerDelegate: IMAWebOpenerDelegate! { get set }

    Objective-C

    @property (readwrite, nonatomic) id<IMAWebOpenerDelegate> webOpenerDelegate;