AdSource
@objc(BMPAdSource)
@objcMembers
public class AdSource : NSObject, @unchecked Sendable
extension AdSource: NSCopying
Represents an ad source which can be assigned to an AdItem.
An AdItem
can have multiple AdSource
s as a waterfalling option.
-
The
AdSourceType
of 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
AdSource
is of typeAdSourceType.ima
, this is equivalent toIMAAdsRequest.setVastLoadTimeout
in the IMA library. - Only supported for
AdSource
s 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
AdSource
is of typeAdSourceType.ima
, this is equivalent to settingIMAAdsRenderingSettings.loadVideoTimeout
in the IMA library. - Only supported for
AdSource
s of typeAdSourceType.ima
.
Default value is
8.0
.Declaration
Swift
public let videoLoadTimeout: TimeInterval
- In case this
-
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
AdSource
s of typeAdSourceType.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
AdSource
s of typeAdSourceType.ima
. Default value is8.0
.videoLoadTimeout
The amount of seconds until the video loading is canceled after the download request started. Only supported for
AdSource
s of typeAdSourceType.ima
. Default value is8.0
. -
Declaration
Swift
public func copy(with zone: NSZone? = nil) -> Any