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 AdSourceType of this AdSource.

    Declaration

    Swift

    public let type: AdSourceType
  • tag

    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.

    Default value is 8.0.

    Declaration

    Swift

    public let vastLoadTimeout: TimeInterval
  • The amount of seconds until the video loading is canceled after the download request started.

    Default value is 8.0.

    Declaration

    Swift

    public let videoLoadTimeout: TimeInterval
  • Creates an AdSource instance with the given tag and type.

    Declaration

    Swift

    public convenience init(tag: URL, ofType type: AdSourceType)

    Parameters

    tag

    URL of the ad tag. In case of using VAST macro placeholders, square brackets have to be URL-encoded.

    type

    Type of the source determining which ad implementation to use.

  • Creates an AdSource instance with the given tag and type.

    Declaration

    Swift

    public convenience init(tag: URL, ofType type: AdSourceType, vastLoadTimeout: TimeInterval)

    Parameters

    tag

    URL of the ad tag. In case of using VAST macro placeholders, square brackets have to be URL-encoded.

    type

    Type of the source determining which ad implementation to use.

    vastLoadTimeout

    The amount of seconds until the VAST loading is canceled after it started. Only supported for AdSources of type AdSourceType.ima.

  • Creates an AdSource instance with the given tag and type.

    Declaration

    Swift

    public init(
        tag: URL,
        ofType type: AdSourceType,
        vastLoadTimeout: TimeInterval = DefaultValues.vastLoadTimeout,
        videoLoadTimeout: TimeInterval = DefaultValues.videoLoadTimeout
    )

    Parameters

    tag

    URL of the ad tag. In case of using VAST macro placeholders, square brackets have to be URL-encoded.

    type

    Type of the source determining which ad implementation to use.

    vastLoadTimeout

    The amount of seconds until the VAST loading is canceled after it started. Only supported for AdSources of type AdSourceType.ima. Default value is 8.0.

    videoLoadTimeout

    The amount of seconds until the video loading is canceled after the download request started. Only supported for AdSources of type AdSourceType.ima. Default value is 8.0.

  • Declaration

    Swift

    public func copy(with zone: NSZone? = nil) -> Any