AdManagerSettings
@objc(AASDKAdManagerSettings)
public final class AdManagerSettings : NSObject
The AdManagerSettings class provides settings to configure an instance of AdManager.
-
Set the external player instance that conforms to the
MediaPlayerStateprotocol. If it is not set, theAdswizzSDKwill use an internal player to play the ad and your application will be notified when to pause/resume your content.Declaration
Swift
@objc public weak var player: MediaPlayerState? -
Adds a cache option that may be provided from outside the SDK. By default, no caching options will be used. Deprecated from v7.8.6 and up. Use the
AdCachePolicyConfigurationinstead.Declaration
Swift
@available(*, deprecated, message: "Please use the AdCachePolicyConfiguration to set and enable caching assets for the AdManager") @objc public func addCachePolicy(_ policy: AdCachePolicy) -
Set the cache configuration that may be provided from outside the SDK. By default, the cache policy configuration does not use any caching options.
Declaration
Swift
@objc public var adCachePolicy: AdCachePolicyConfiguration -
Set an
AdAssetQualityoption that will be used to load/play the asset that matches the level of quality. If theAdManagercan’t find a match for the level you set, it will use the next ‘best’ quality level if available. The default ishigh.Declaration
Swift
@objc public var assetQuality: AdAssetQuality -
Set a maximum value for the threshold that will be used in selecting the ad asset creative with the highest bitrate less than or equal to the given value. The given value is measured in bits/s. If no ad asset creative is less than or equal to the given value, the Ad Manager will select the one with the closest bitrate to the given value. Note that, by setting a non-zero value, the
AdManagerwill disregard any quality level you set viaassetQuality. The default is 0.Declaration
Swift
@objc public var preferredMaxBitrate: UInt64 -
Set the video view that is responsible for rendering video ads. If it is not set, the SDK will still play the audio track of the video ad.
Declaration
Swift
@objc public var videoView: AdVideoView? -
Set an optional timeout interval measured in seconds if the internal player should detect stalling automatically when the AdManager plays the ads. By default, this property is 0 which means that detecting stalling automatically is disabled. Enable it by setting a value greater than or equal to 3. Note that the recommended value is 3 seconds or more in order to minimize triggering the stalled error too early.
Declaration
Swift
@objc public var timeoutIntervalBeforeStalling: TimeInterval -
Set the interstitial event monitor that provides support for playing the ads during a HLS interstitial event (ad break). This will instruct the
AdManagerto sync the ads playback (which were previously set as template items) with theinterstitialPlayerwhen the interstitial event is triggered. If you have your own custom implementation for HLS interstitials, use theplayerproperty instead (and set your interstitial player as external player instance that conforms to theMediaPlayerStateprotocol).Declaration
Swift
@objc public weak var adInterstitialEventMonitor: AdInterstitialEventMonitor? -
Indicates whether caching capabilities for creative assets are enabled or not.
Declaration
Swift
@objc public func isCachedAssetsEnabled() -> BoolReturn Value
trueif the cache option for assets is enabled, orfalseotherwise