AdSource
@objc(BMPAdSource)
@objcMembers
public class AdSource : NSObject
extension AdSource: NSCopying
Represents an ad source which can be assigned to an AdItem.
An AdItem can have multiple AdSources as a waterfalling option.
-
The
AdSourceTypeof thisAdSource.Declaration
Swift
public let type: AdSourceType -
The ad tag / url to the ad manifest.
Declaration
Swift
public let tag: URL -
The amount of seconds until the VAST loading is canceled after the download request started.
- In case this
AdSourceis of typeAdSourceType.ima, this is equivalent toIMAAdsRequest.setVastLoadTimeoutin the IMA library. - Only supported for
AdSources of typeAdSourceType.ima.
Default value is
8.0.Declaration
Swift
public let vastLoadTimeout: TimeInterval - In case this
-
The amount of seconds until the video loading is canceled after the download request started.
- In case this
AdSourceis of typeAdSourceType.ima, this is equivalent to settingIMAAdsRenderingSettings.loadVideoTimeoutin the IMA library. - Only supported for
AdSources of typeAdSourceType.ima.
Default value is
8.0.Declaration
Swift
public let videoLoadTimeout: TimeInterval - In case this
-
Creates an
AdSourceinstance with the given tag and type.Declaration
Swift
public convenience init(tag: URL, ofType type: AdSourceType)Parameters
tagURL of the ad tag. In case of using VAST macro placeholders, square brackets have to be URL-encoded.
typeType of the source determining which ad implementation to use.
-
Creates an
AdSourceinstance with the given tag and type.Declaration
Swift
public convenience init(tag: URL, ofType type: AdSourceType, vastLoadTimeout: TimeInterval)Parameters
tagURL of the ad tag. In case of using VAST macro placeholders, square brackets have to be URL-encoded.
typeType of the source determining which ad implementation to use.
vastLoadTimeoutThe amount of seconds until the VAST loading is canceled after it started. Only supported for
AdSources of typeAdSourceType.ima. -
Creates an
AdSourceinstance with the given tag and type.Declaration
Swift
public init( tag: URL, ofType type: AdSourceType, vastLoadTimeout: TimeInterval = DefaultValues.vastLoadTimeout, videoLoadTimeout: TimeInterval = DefaultValues.videoLoadTimeout )Parameters
tagURL of the ad tag. In case of using VAST macro placeholders, square brackets have to be URL-encoded.
typeType of the source determining which ad implementation to use.
vastLoadTimeoutThe amount of seconds until the VAST loading is canceled after it started. Only supported for
AdSources of typeAdSourceType.ima. Default value is8.0.videoLoadTimeoutThe amount of seconds until the video loading is canceled after the download request started. Only supported for
AdSources of typeAdSourceType.ima. Default value is8.0. -
Declaration
Swift
public func copy(with zone: NSZone? = nil) -> Any
AdSource Class Reference